cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

Top 5 Variances DAX

Hey All, 

 

How would I create a DAX formula to take the top 5 variance over OR under a threshold amount of $12k? 

 

Any help would be much appreciated. 

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: Top 5 Variances DAX

HI @Anonymous,

 

You can try to use following measure if it works for your scenario.

Rank =
RANKX (
    ALL ( Table ),
    CALCULATE ( SUM ( Table[Variances] ), ALLEXCEPT ( Table, Table[Country] ) ),
    ,
    ASC,
    DENSE
)

 

If not help, please share a table with some sample data to test.

 

Regards,

Xiaoxin Sheng

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



For learning resources/Release notes, please visit: | |

View solution in original post

4 REPLIES 4
Super User
Super User

Re: Top 5 Variances DAX

Sample data and expected results would assist greatly.

I have book! Learn Power BI from Packt


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

Proud to be a Datanaut!

Anonymous
Not applicable

Re: Top 5 Variances DAX

@Greg_Deckler Here is the Variance and country column. (Attached)

 

Expected Results would Top 5 Var over sale's plan by Country:

 

1.France -12,050

2. USA - (12,050)

3. Germany - 50,000

4. Sweden - 75,000

5. Canada - (100,000)

Var Question.PNG

 

Anonymous
Not applicable

Re: Top 5 Variances DAX

Can anyone give some insight on this topic?

Community Support Team
Community Support Team

Re: Top 5 Variances DAX

HI @Anonymous,

 

You can try to use following measure if it works for your scenario.

Rank =
RANKX (
    ALL ( Table ),
    CALCULATE ( SUM ( Table[Variances] ), ALLEXCEPT ( Table, Table[Country] ) ),
    ,
    ASC,
    DENSE
)

 

If not help, please share a table with some sample data to test.

 

Regards,

Xiaoxin Sheng

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



For learning resources/Release notes, please visit: | |

View solution in original post

Helpful resources

Announcements
Can You Solve These Challenge

Challenge: Can You Solve These?

Find out how to participate in the first Power BI 'Can You Solve These?' challenge.

Community News & Announcements

Community News & Announcements

Get your latest community news and announcements.

Virtual Launch Event

Microsoft Business Applications October Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

Community Kudopalooza

Win Power BI Swag with Community Kudopalooza!

Each week, complete activities and be qualified in the drawing for cool Power BI Swag.

Users Online
Currently online: 43 members 863 guests
Please welcome our newest community members: