Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
My data has years 2018 to 2021. I am comparing sales with the previous years and have created different DAX for that but for dynamic header based on selection of year, I am using below mentioned DAX but not getting the required result;
Selected value = Calendar Year (filter)
Solved! Go to Solution.
Hi @Saadahmedqu
Thanks for reaching out to us.
please use the sample file attached below
Best Regards,
Community Support Team _Tang
If this post helps, please consider Accept it as the solution to help the other members find it more quickly.
Hi @Saadahmedqu
Thanks for reaching out to us.
please use the sample file attached below
Best Regards,
Community Support Team _Tang
If this post helps, please consider Accept it as the solution to help the other members find it more quickly.
Hi,
Based on my test your measure seems to be working. Here is an improved dax using variables:
If this still doesn't work I recommend cheking what filters affect your visuals. The issue might be there.
Proud to be a Super User!
Thank you so much for your reply. I have used your solution also but even then it is not displaying result in card
The card displayed above based on selection is DAX used by me and the second card displaying cross sign is the query you provided. I think the problem is with multiple conditions based on the selection with hasvalue. There are no filters applied on visuals or page.
Below is the solution provided by you;
Can this issue be solved by fixing it to min year criteria?
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
Check out the November 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 20 | |
| 11 | |
| 10 | |
| 4 | |
| 4 |
| User | Count |
|---|---|
| 34 | |
| 31 | |
| 19 | |
| 12 | |
| 11 |