The ultimate Microsoft Fabric, Power BI, Azure AI, and SQL learning event: Join us in Stockholm, September 24-27, 2024.
Save €200 with code MSCUST on top of early bird pricing!
Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
Hi All,
Background: I am trying to utilize the 'Hasonefilter()' and 'Isfiltered' DAX function to keep my line chart from displaying data until one of two columns is filtered. I have been able to do this successfully if I do not have anything in the Legend.
My function looks like this:
SiteSelectCheck_child = IF(or(ISFILTERED([MAD_Site]), HASONEFILTER('Hub/Child'[CHILD])),1,2)
Issue: In my line chart I want 'Child' to be the Legend. When I put 'Child' in the legend it counts as a filter with the Hasonefilter() and Isfiltered DAX functions. So the Isfiltered function will always be true, And the Hasonefilter function doesn't seem to be working as expected.
Some images of what I have right now with this function. I have been able to get 2/3 of the scenarios below with different functions, but never all 3 to work.
When nothing is filtered. The chart without a Legend doesn't show any data, but the chart with a Legend does show data (need this to not show data).
When I filter the Mad_Site. it successfully shows data in both.
When I filter the Child. It successfully filters only the child.
Conclusion: I can get all 3 of these scenarios if I take out the legend on my line chart, but then I'm not displaying all of the Child values.
Any help would be appreciated!
“Without my morning coffee I’m just like a dried up piece of roast goat.”
The DAX functions are working as expected. Maybe we can use some other formulas to get the desired result.
Could you please provide some sample data of your table, or share your PBIX file through online file service like OneDrive?
Best Regards,
Herbert
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Check out the August 2024 Power BI update to learn about new features.
User | Count |
---|---|
114 | |
79 | |
76 | |
46 | |
39 |
User | Count |
---|---|
143 | |
115 | |
64 | |
64 | |
53 |