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

Get certified in Microsoft Fabric—for free! For a limited time, the Microsoft Fabric Community team will be offering free DP-600 exam vouchers. Prepare now

Reply
knamburi
Frequent Visitor

Calculating percentage of difference from total dataset average to a particular row

Hello All,

 

Looking for suggestion to solve a problem

 

triptime (column C ) is a measure column 

 

now i want to find the total average - of trip time which is 322.84 in this case and want to calculate how each driver is doing against average.

I tried using CALCULATE(AVERAGE(measure))  and few other methods but did not work

 

below is the example to calculate Average %

 

knamburi_0-1708125705564.png

 

any help is appreciated. 

 

Regards,

K

 

1 ACCEPTED SOLUTION
Ahmedx
Super User
Super User

Based on your description, I created data to reproduce your scenario. The pbix file is attached in the end.

Screenshot_1.png

View solution in original post

4 REPLIES 4
knamburi
Frequent Visitor

Thank you so much - this really solved my problem. Missing REMOVEFILTERS() - i never thought about it

 

But i have another question, this will disable all the filters - how can i exclude few specific - like i want to use few - i tried using KEEPFILTERS() but i guess its not working as expected.

to exclude something specific you need to use ALLEXCEPT functions
or additionally write VALUES:

m1 = CALCULATE(
[total average],REMOVEFILTERS(),VALUES('table'[Category]),
VALUES('table'[Year]))
Ashish_Mathur
Super User
Super User

Hi,

Share the download link of the PBI file.


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

Based on your description, I created data to reproduce your scenario. The pbix file is attached in the end.

Screenshot_1.png

Helpful resources

Announcements
OCT PBI Update Carousel

Power BI Monthly Update - October 2024

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

September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

October NL Carousel

Fabric Community Update - October 2024

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