Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
I have the following data:
Table with countries, date, and a value
Country | Value | Year |
USA | 3 | 2016 |
France | 6 | 2016 |
Germany | 2 | 2016 |
USA | 1 | 2017 |
France | 4 | 2017 |
Germany | 5 | 2017 |
Measures:
Avg_Val_CurrentYear = Calculate(Average(Value), DATEADD('Date'[Date], 0, Year)) --I'm sure there was a better way
Avg_Val_PreviousYear = Calculate(Average(Value), DATEADD('Date'[Date], -1, Year))
My goal:
Create a map where the country is red if the Avg_Val_CurrentYear is less than Avg_Val_PreviousYear and green if Avg_Val_CurrentYear is greater than Avg_Val_PreviousYear. The page will have a slicer to select the year so this would change based on the year I have selected.
How can I do this? I've tried creating a calculated column in the table that marks it red or green based on the 2 measures, but it does not mark the colors properly. Any advice would be appreciated.
Thanks!
Solved! Go to Solution.
I found the solution:
I found the solution:
Hi @tasmiaa ,
Based on my test, it is not possible to conditional formatting in shape map in power bi.You can come up a new idea about that and add your comments there to improve Power BI and make this feature coming sooner.
https://ideas.powerbi.com/forums/265200-power-bi-ideas
Regards,
Frank
Thanks, I was actually asking about a filled map and not a shape map, but I was able to figure out the issue. My solution is posted on the thread! 🙂
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
113 | |
99 | |
80 | |
70 | |
59 |
User | Count |
---|---|
149 | |
114 | |
107 | |
89 | |
67 |