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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Dominik82
Frequent Visitor

Measure calculate difference from line value to total value

Hi all,

 

currently I'm building a report on an existing dataset and I can use only measures for some calculations.

Now I'm facing on a problem to calculate the differnece from line value to total value.

 

At first I've a measure which calculates the average of a column with some filters.

 

 

 

 

Average = 
    VAR Temp =
        CALCULATE(
            SUM(Table[Probability])
            ,REMOVEFILTERS(Table[Product])
        )

    VAR AmountID =
        DISTINCTCOUNT(Table[ID])

    RETURN
        IF(AmountProjects = 0, BLANK(), (Temp / AmountID) / 100)

 

 

 

 

Works well, my table in the report looks like this:

PhaseAmountAverageDifference
1422,50% 
2130,00% 
31100,00% 
41100,00% 
Total745,71%

 

 

My problem is, that I don't know how I can calculate the difference from the column average per line to the total value of column average.
Maybe someone has a hint how to solve this?


Thanks in advance,
Dominik

2 REPLIES 2
Anonymous
Not applicable

Thanks for the reply from @amitchandak , please allow me to provide another insight: 

Hi  @Dominik82 ,

 

Are you referring to comparing the Total of 45.71% for [Average] with each row’s [Average]?

You can create a measure to calculate the result of Total 45.71%, and then subtract it from [Average] for comparison. I’m not quite clear on how the Total of 45.71% is calculated. If it’s convenient for you, could you explain the logic behind calculating the Total value and share sample data and expected output in a table format? Alternatively, if you could provide an example pbix file with sensitive data removed, we could assist you better.

 

Best Regards,

Liu Yang

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

amitchandak
Super User
Super User

@Dominik82 , Based on what I see on visual, it should be like , assuming Amount is a measure

 

divide([Amount], calculate([Amount], removefilters(Table[Phase]) ) )

Or use a visual calculation template for % of the total

 

Master Visual Calculations in Power BI- February 2024 Update RUNNINGSUM, RANGE, MOVINGAVERAGE, COLLAPSE, COLLAPSEALL, EXPAND, EXPANDALL, FIRST, LAST, PREVIOUS, and NEXT
https://www.youtube.com/watch?v=bKD9T0EWgQo&list=PLPaNVDMhUXGYo50Ajmr4SgSV9HIQLxc8L

amitchandak_0-1718033025204.png

 

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors