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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
rahuldas_vgm
Helper I
Helper I

How to show top 10 values without changing their calculated values

Hello everyone,

 

I have a matrix visualization which contains 8 months data. When I select the month in slicer, I get the data I want to show. But, when I apply TopN filter the %age calculated measures aggregates the values on the basis of TopN and shows aggregated values on the basis of the top N instead of showing the values with respect to entire data.

Eg:

 

Branch        Qty       Sales     %GT Sales

A                  10         100           1.11

B                   10         1000        11.11 

C                   10         2000         22.22

D                   10         5000         55.56

E                     10        900           10

 

My Filter of TopN is by Qty for top3

 

I want to show:

Branch        Qty       Sales     %GT Sales

B                   10         1000        11.11 

C                   10         2000         22.22

D                   10         5000         55.56

 

But 

 

the column %GT values changes and shows as :

%GT Sales

12.5%

25%

62.5%

----------

100%

 

How can I show the topN values as they are on overall and not on the basis of top3.

 

Thanks a lot for any help!

Regards,

Rahul

1 ACCEPTED SOLUTION
negi007
Community Champion
Community Champion

@rahuldas_vgm  in this case, there is workaround, you can create a table having topN values

 

in this case, we have assumed you want to have only top3 value which you can change as per your needs

 

Table_Top_value =
TOPN(
3,
VALUES(sales_tab[Branch]),
calculate(sum(sales_tab[Sales]))
)
 
then you can create a calc column in your main table like below to group top and non top values
In_Top = if(isblank(LOOKUPVALUE(Table_Top_value[Branch],Table_Top_value[Branch],sales_tab[Branch])),"not in top3","top3")
 
negi007_0-1639065123494.png

 

then in your visual, you can apply a filter to show only topN values, below is the expected output

 

negi007_1-1639065182906.png

 

 i am attaching pbix file as well. thanks.
 



Did I answer your question? Mark my post as a solution!
Appreciate your Kudos



Proud to be a Super User!


Follow me on linkedin

View solution in original post

4 REPLIES 4
Ashish_Mathur
Super User
Super User

Hi,

Could you share the download link of your PBI file?


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
v-yalanwu-msft
Community Support
Community Support

Hi, @rahuldas_vgm ;

You can just create a measure, as follows:

Measure = SUM([Sales])/SUMX(ALL('sales_tab'),[Sales])

The final output is shown below:

vyalanwumsft_0-1639360800065.png

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.

negi007
Community Champion
Community Champion

@rahuldas_vgm if this resolve your problem, please accept my solution to help others. 




Did I answer your question? Mark my post as a solution!
Appreciate your Kudos



Proud to be a Super User!


Follow me on linkedin

negi007
Community Champion
Community Champion

@rahuldas_vgm  in this case, there is workaround, you can create a table having topN values

 

in this case, we have assumed you want to have only top3 value which you can change as per your needs

 

Table_Top_value =
TOPN(
3,
VALUES(sales_tab[Branch]),
calculate(sum(sales_tab[Sales]))
)
 
then you can create a calc column in your main table like below to group top and non top values
In_Top = if(isblank(LOOKUPVALUE(Table_Top_value[Branch],Table_Top_value[Branch],sales_tab[Branch])),"not in top3","top3")
 
negi007_0-1639065123494.png

 

then in your visual, you can apply a filter to show only topN values, below is the expected output

 

negi007_1-1639065182906.png

 

 i am attaching pbix file as well. thanks.
 



Did I answer your question? Mark my post as a solution!
Appreciate your Kudos



Proud to be a Super User!


Follow me on linkedin

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors