📌 Problem Statement
Often in Power BI reports, we want to display a dynamic value selected from a slicer — such as the year — alongside a static message for a more user-friendly view.
For example:
If the user selects the year 2022 from the slicer, we want to show a card that reads:
“Year is: 2022”
Let’s see how we can achieve that.
✅ Step-by-Step Solution
🔹 Step 1: Add a Slicer
Start by adding a slicer to your report.
In this case, we are using the Year column from the 'Date Table'.

🔹 Step 2: Create a Dynamic Measure
Now, we’ll write a DAX measure that displays the selected year along with a custom message.
Selected_Year_Text =
VAR Cond =
IF(
HASONEVALUE('Date Table'[Year]),
SELECTEDVALUE('Date Table'[Year]),
""
)
RETURN
"Year is: " & Cond
📝 Explanation:
- HASONEVALUE ensures only one year is selected.
- SELECTEDVALUE retrieves that selected year.
- The result is concatenated with the static text "Year is: ".
🔹 Step 3: Display the Measure in a Card
Add a Card Visual to your report canvas and drag the Selected_Year_Text measure into it.
Whenever a user selects a year in the slicer, the card will dynamically update to reflect that choice.
🎯 Final Result
When the user selects 2022, the card will show:
Year is: 2022

If no year is selected (or multiple are selected), the card will be blank or show a default message depending on how you enhance your DAX.
🧠 Conclusion
Using a combination of slicers and DAX, we can easily create dynamic card visuals that reflect user selections. This adds a personalized touch to reports and helps users keep track of applied filters at a glance.
💡 Want to take it a step further?
Try applying this logic to show selected regions, product categories, or even date ranges!
Best regards
Anmol Malviya
Sr. Data Analyst | Addend Analytics