Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more.
Get startedGrow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.
I want to show a dynamic chart according to how many years were chosen in a slicer. When 1 years was selected, the pie chart would show, otherwise the pie chart would show nothing. So I create a measure as the value of the pie chart.
stay number= if(COUNTROWS(VALUES(table1[years])=1,DISTINCTCOUNT(table1[Stay Number]),BLANK()).
The problem is that the pie chart still show some data when this measure return BLANK(). I am so confused cause when I let stay number directly equals BLANK(), the pie chart works correctly. I wonder if there's sth wrong with this DAX, but I've checked the DAX indeed return BLANK() when I selected 2 years.
I also try another measure:
stay number = if(ISFILTERED(table1[years]),DISTINCTCOUNT(table1[Stay Number]),BLANK()).
The pie chart with this measure works correctly all the time. But it does not satisfy my requirement: only show when 1 fiscal year was selected.
How can I solve it?
Hi @Yutong
Please provide sample data that covers your issue or question completely, in a usable format (not as a screenshot).
https://community.powerbi.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-...
Please show the expected outcome based on the sample data you provided.
https://community.powerbi.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Ask questions in Eventhouse and KQL, Eventstream, and Reflex.
User | Count |
---|---|
86 | |
84 | |
66 | |
62 | |
61 |
User | Count |
---|---|
197 | |
118 | |
108 | |
78 | |
69 |