Forum Discussion
JBHCSS
3 years agoFrequent Visitor
Find the difference between values in a group
I'm new to Power BI and I am struggling to figure out how to calculate the difference between values within a group. I want to calculate the difference between the amount for the values within a grou...
- 3 years ago
Hi JBHCSS ,
Try this:Dif = Var _project = MAX(Difference[PROJECT]) Var _bidAmount = MAX(Difference[BID AMOUNT]) Var _minBidAmount = CALCULATE(MIN(Difference[BID AMOUNT]),FILTER(all(Difference),Difference[PROJECT]=_project)) Var _diff = _bidAmount-_minBidAmount Return _diff
Let me know if you have any questions.
If this solves your issues, please mark it as the solution, so that others can find it easily. Kudos πare nice too.
Nathaniel
Nathaniel_C
Community Champion
3 years agoHi JBHCSS ,
Try this:
Dif =
Var _project = MAX(Difference[PROJECT])
Var _bidAmount = MAX(Difference[BID AMOUNT])
Var _minBidAmount = CALCULATE(MIN(Difference[BID AMOUNT]),FILTER(all(Difference),Difference[PROJECT]=_project))
Var _diff = _bidAmount-_minBidAmount
Return _diff
Let me know if you have any questions.
If this solves your issues, please mark it as the solution, so that others can find it easily. Kudos πare nice too.
Nathaniel
Nathaniel_C
Community Champion
3 years ago
Your table will look like this:
Let me know if you have any questions.
If this solves your issues, please mark it as the solution, so that others can find it easily. Kudos πare nice too.
Nathaniel