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 Everyone,
The Sample data looks like the below,
Country / Category | A | B | C |
South Africa | 1 | 1 | |
United States | 1 | 1 | |
Malaysia | 1 | 1 | |
Austria | 1 | ||
India | 1 | 1 | |
Italy | 1 | ||
Mexico | 1 | ||
Portugal | 1 | ||
Canada | 1 | 1 |
Our Main Category to be considered is "A". For countries, where we dont have data for Category "A", then the value for that would the Average Value of Category B & C. For Countries like South Africa, United States, Malaysia, India, etc., dont have Category A data. For that, we need include the Category as "A" and add the corresponding value as Avg(Category B, Catgeory C).
Here Country & Category is used as a slicer. So if we select "South Africa" in Country slicer, then in Catgeory slicer it should show all 3 categories, instead of showing Category B & C which have data for that country. How can we achieve this? Please provide a PBIX file with solution / DAX in achieving this requirement.
This is an urgent requirement to be done in priority today. Please help me with your solutions to get it fixed soon. Thanks in advance !!
Solved! Go to Solution.
Hi @Anonymous ,
You can try to use IF function. Because I don’t know how your average is calculated, I use text instead.
Measure = IF(MAX('Query1'[A])=1,"Average measure1",IF(MAX('Query1'[B])=1||MAX('Query1'[C])=1,"Average measure2"))
Best Regards,
Stephen Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Anonymous ,
You can try to use IF function. Because I don’t know how your average is calculated, I use text instead.
Measure = IF(MAX('Query1'[A])=1,"Average measure1",IF(MAX('Query1'[B])=1||MAX('Query1'[C])=1,"Average measure2"))
Best Regards,
Stephen Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Easiest is to fill the gaps in Power Query. Your display requirement is unclear. Consider showing all categories at all times.
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 |
---|---|
109 | |
79 | |
72 | |
48 | |
39 |
User | Count |
---|---|
138 | |
108 | |
69 | |
64 | |
57 |