Forum Discussion
Creating a bar chart with special condition
Hi FabiNeed ,
According to your description, I download your pbix. As shown below, each ID corresponds to unique country.
So you can get "which country has the higher value in each category" or "which Unique ID has the higher value in each category", they are actually the same result. But I'm not sure if that's what you mean by "for each Unique ID which country has the higher value in each category".
If that is the case, put category in the bar chart Axis, country in the Legend and value in Values, get the result.
I attach my sample below for reference.
Best Regards,
Community Support Team _ kalyj
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Thank you v-yanjiang-msft for this suggestion. Unfortunately, this is not quite what I was looking for. I'll try to make it a little clearer :
Let's take the first row from Table 1:
| UniqueID | Country_1 | Country_2 | |
| 1444765|5439351 | AFG | AIA |
There is a UniqueID with two different countries. For each country, there is a value in Table 2. In this case:
| Category | AFG | AIA |
| Famone | 1 | 1 |
| Omicet | 1 | 1 |
| Pausne | 1 | 1 |
| Bizoad | 1 | 2 |
| Peamul | 2 | 1 |
| Aconat | 3 | 3 |
This reads, for example: For the Category "Bizoad" the value for Country "AFG" is 1 and for Country "AIA" 2. My objective is to automatically choose the higher value for the bar chart visualization. In the visualisation the values (1 to 3) should be taken as the legend. Do you (or of course anyone else) have a solution for this as well?