cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
sharath459
Frequent Visitor

TopN with filter

Hi, 

 

I wrote this measure to get Revenue total for top 10 Accounts.  I am getting back top 10 revenue with an unknown value.

I want to filter out the value and still get top 10.  But, i am getting only top 9 total when i filter it out.

 

Top10Rev = CALCULATE([Revenue],KEEPFILTERS(FILTER(ALL('Cust Account'[AccountName]),CONTAINS(TOPN(10,ALL('Cust Account'[AccountName]),[Revenue]),'Cust Account'[AccountName],'Cust Account'[AccountName]))))

4 REPLIES 4
Super User IV
Super User IV

Re: TopN with filter

Hi,

 

What result do you get with this measure

 

=SUMX(TOPN(10,VALUES('Cust Account'[AccountName]),[Revenue]),[Revenue])


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

Re: TopN with filter

I get all Accounts with that.

Super User IV
Super User IV

Re: TopN with filter

Hi,

 

ANd what hapens when you replace VALUES() with ALLSELECTED()?


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

Re: TopN with filter

Hi @sharath459,

 

Can you share the file or a dummy sample? What's the formula of [Revenue]?

 

 

Best Regards,
Dale

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

Helpful resources

Announcements
‘Better Together’ T-Shirt Contest – Winner Announced!

‘Better Together’ T-Shirt Contest – Winner Announced!

And the winner is...

Announcing the New Spanish Forum

Announcing the New Spanish Forum

Do you need help in Spanish? Check out our new Spanish community section.

April 2020 Community Highlights

April 2020 Community Highlights

Info on our Super Users, MBAS content and badges, and updates to our support articles. - Read the full Community Highlights.

MBAS Gallery 2020

MBAS Gallery 2020

Watch Microsoft Business Applications Summit sessions on-demand.

Top Solution Authors
Top Kudoed Authors