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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
brawndo
Frequent Visitor

Display top 10 discrepancies in table

I have a table that shows me estimates of a project and the actual cost. In some cases the estimate is below the actual cost and vise versa. I created a measure to show the variances between the actuals and the estimates.  How can I create a table that will show me the top 10 values regardless of them being negative or positive numbers.

2 ACCEPTED SOLUTIONS
Ashish_Mathur
Super User
Super User

Hi,

Create a measure to calculate the absolute variance

Absolute variance = If([variance]<0,-[variance],[variance])

Now use the RANKX() function to rank the Absolute variance measure.  Then apply a filter on the RANKX measure to show only Top 10 values.

Hope this helps.


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

View solution in original post

V-lianl-msft
Community Support
Community Support

Hi @brawndo ,
 
As @Ashish_Mathur  Said before, For more details, you can refer to this pbix
 
Best Regards,
Liang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

4 REPLIES 4
V-lianl-msft
Community Support
Community Support

Hi @brawndo ,
 
As @Ashish_Mathur  Said before, For more details, you can refer to this pbix
 
Best Regards,
Liang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Thank you @Ashish_Mathur and @V-lianl-msft  so much! This has helped me tremendously. There is a separate issue I'm running into. I want to expand upon this. I have four different regions and I want to show the top 10 in each region. 

 

 

 

 

@Ashish_Mathur  @V-lianl-msft . I just solved my previous question using the following.

Sandbox Top 10 = CALCULATE([Top 10 Values], 
FILTER(VALUES('Cost Report Plan vs Actual 1201'[WR Number]),
IF(RANKX(ALL('Cost Report Plan vs Actual 1201'[WR Number]), [Top 10 Values],,DESC) <= 'Ranking Selections'[Ranking Select],[Top 10 Values], BLANK() ) ) )

 With this slicer.

Ranking Select = IF(HASONEVALUE('Ranking Selections'[Ranking]), VALUES('Ranking Selections'[Rank Number]), 100000)

 

Ashish_Mathur
Super User
Super User

Hi,

Create a measure to calculate the absolute variance

Absolute variance = If([variance]<0,-[variance],[variance])

Now use the RANKX() function to rank the Absolute variance measure.  Then apply a filter on the RANKX measure to show only Top 10 values.

Hope this helps.


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

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.