Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
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:
| Phase | Amount | Average | Difference |
| 1 | 4 | 22,50% | |
| 2 | 1 | 30,00% | |
| 3 | 1 | 100,00% | |
| 4 | 1 | 100,00% | |
| Total | 7 | 45,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
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.
@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
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
| User | Count |
|---|---|
| 92 | |
| 69 | |
| 50 | |
| 40 | |
| 35 |