Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

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.

Reply
Syndicate_Admin
Administrator
Administrator

Percentage card. Measure to calculate sum of TOPs??

Hello

I have a database with several countries (A,B...) and the amount of product that has been sold to them in each quarter of each year between 2017-2023:

janireetx_0-1709549667384.png

I would like to create a measure that calculates the sum of the quantity sold to the 4 TOP countries, i.e. those to which the most have been sold. I would like to create a card with that measurement and have that card change with quarter/year segments, so that the sum of the 4 TOPs of each moment appears, not the sum of the 4 global TOPs. That is, maybe in overall the 4 TOPs are A,C,D,E but maybe in 2021 the 4 TOPs are A,B,D,E; I would like you to take into account the countries of each year.
I would like to create it in a measure so that I can then put a card in which the percentage that represents the amount sold to the 4 TOPs with respect to the amount sold to all countries appears, modifiable by years and quarters.


In graph I wouldn't know how to do it, because when calculating the 4 TOPs and putting the years on the 'x-axis' directly the 4 countries that appear are the 4 most important in the overall sum. Then, if I filter by years, the years of each year do appear, but I can't see it that way in the graph with all the years.

janireetx_4-1709549760259.png

Thank you

2 REPLIES 2
v-yohua-msft
Community Support
Community Support

Hi, @Syndicate_Admin 

 

Based on your information, I create a table:

 

vyohuamsft_0-1709626145213.png

 

In the filter, we can filter the top four countries based on the sum of the cant of each country

 

vyohuamsft_3-1709627083118.png

 

Then create a Slicer, and put Year filed in it.

 

vyohuamsft_2-1709626949587.png

 

How to Get Your Question Answered Quickly 

Best Regards

Yongkang Hua

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

Hello, I understand that then you can only see the 4 TOPs of each year by segmenting the graph and selecting each year, I could not place all the years on the 'x-axis' and that in each year the 4 annual TOPs appeared.

This is to build the graph, but how could I create a measure to calculate those 4 TOPs? My real goal is to create a card in which the percentage of quantity sold to the 4 TOPs appears with respect to the quantity sold to all countries, segmenting the card by years and quarters. Thank you!

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.