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
michellem0771
Helper I
Helper I

Calculate Count of Customers when TopN Filter Changes

Hello,

 

I'm hoping someone can help with this.

 

I have a report that lists Client, Revenue and Rank.

michellem0771_0-1701898477511.png

 

I also have several filters in the filter pane along with a filter to show TopN that may change from 10 to 100 in increments of 5.

michellem0771_1-1701898505233.png

 

Next to the list of client information, I have a summary that shows total revenue and client count.

michellem0771_2-1701898569984.png

Everything filters fine when I use the filters on the filters pane, however, when I choose a different "TopN" number, the Client Count and the Total Rev amount to not update to show the numbers, they stay the same.  I'd like to see that where the TopN Filter Selection changes as shown below, the count and revenue numbers update as well.

michellem0771_3-1701898695971.png

I have done many searches, and perhaps I am not wording my questions correctly, but I have been unable to find anything helpful.

 

Is what I am looking to do possible?

 

Thanks for any help you can provide!

1 ACCEPTED SOLUTION
Ashish_Mathur
Super User
Super User

Hi,

You will have to create a disconnected table (named TopN with a single column called number) with numbers ranging from 1-5.  Create a slicer and select 3 there.  Write these measures

Selected Top n value = selectedvalue(Topn[Number])

Revenue from Top n customers = sumx(topn([Selected Top n value],values(Data[Customer]),[Revenue]),[Revenue])

Hope this helps.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

View solution in original post

4 REPLIES 4
Ashish_Mathur
Super User
Super User

Hi,

You will have to create a disconnected table (named TopN with a single column called number) with numbers ranging from 1-5.  Create a slicer and select 3 there.  Write these measures

Selected Top n value = selectedvalue(Topn[Number])

Revenue from Top n customers = sumx(topn([Selected Top n value],values(Data[Customer]),[Revenue]),[Revenue])

Hope this helps.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

This worked great, thank you so much!

You are welcome.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
vanessafvg
Super User
Super User

are you able to share your data?  and can you give an example of what you expect the output to be.

 

If you cannot share your data please provide some sample data in text format.





If I took the time to answer your question and I came up with a solution, please mark my post as a solution and /or give kudos freely for the effort 🙂 Thank you!

Proud to be a Super User!




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!

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