cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
CPA_Califonia Regular Visitor
Regular Visitor

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 @CPA_Califonia,

 

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: | |
4 REPLIES 4
Super User
Super User

Re: Top 5 Variances DAX

Sample data and expected results would assist greatly.

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

Proud to be a Datanaut!


CPA_Califonia Regular Visitor
Regular Visitor

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

 

CPA_Califonia Regular Visitor
Regular Visitor

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 @CPA_Califonia,

 

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: | |