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
papuzu
Helper II
Helper II

how to show weight % of topN filter plotted

hello there, 

hope title is sufficiently satisfiable 

 

basically I'm trying to understand how to represent on the plotted chart showing the Top N filter, the quota-part of the whole dataset the TopN filter is representing 

For example when I'm setting up the TopN=5 products and the sum of products plottered equals to 76% of the whole dataset behind I would like this to be seen somewhere. 

 

thank you for helping

6 REPLIES 6
v-yalanwu-msft
Community Support
Community Support

Hi, @papuzu ;

Is the answer helpful to you? If so, Would you mind accept the helpful replies as solutions? Then we are able to close the thread. More people who have the same requirement will find the solution quickly and benefit here. Thank you.

Best Regards,
Community Support Team_ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

hi there , thanks indeed for prompt replies. 

the question was about the case of representing with TopN = 5 filter , the 5 products, for example, that when represented (since they are the biggest one of a larger population of items) they sum up to a given % which is less than 100% . In the example I've added in here, the TopN = 5 selection reported a total of 76% but this can change in case of other datasets. I would like the viewer of the chart to understand how much of the total population we are representing with topN=5 filter plotted 

 

thank you

Hi, @papuzu ;

Unfortunately, I still don't understand the logic of 76%? Can you show the desired output results and logical screenshots?

vyalanwumsft_0-1631857016493.png

Best Regards,
Community Support Team_ Yalan Wu

v-yalanwu-msft
Community Support
Community Support

Hi, @papuzu ;

You could create a measure.

Measure = var _top=TOPN(5,'Q2_',[Quantity],DESC)
var _per= DIVIDE(SUMX(_top,[Quantity]),SUMX(ALL(Q2_),[Quantity]))
return IF(_per>=0.76,"True","False")

The final output is shown below:

vyalanwumsft_0-1631164800320.png

I don’t understand your question very well, so if I don’t understand it correctly, can you share more details? And the result you want to output according to your file?


Best Regards,
Community Support Team_ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

amitchandak
Super User
Super User

@papuzu , Try measure like

 


divide(calculate([measure], ,TOPN(5,allselected(Table[Axis Column]),[Amount],DESC), values(Table[Axis Column])), [measure])

 

or

 

 

divide(calculate([measure], ,TOPN(5,allselected(Table[Axis Column]),[Amount],DESC), values(Table[Axis Column])), calculate([measure], allselected()))

https://drive.google.com/file/d/1c-mgH7P77a_1YI_tPxkYnLkrTxuByeau/view?usp=sharing

 

I've added an example in here 

can you show that up there ? I can't get much feeding the formula above. thanks 

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.