Forum Discussion
brunoguedes
9 years agoFrequent Visitor
Calculate absolute profitability
Hello, I'm new to power bi and my English sucks. I need a lot of help. I need to calculate the absolute profitability of a column with several values that are modified by the date. According t...
- 9 years ago
brunoguedesOkay so you want the percent calculated ALWAYS from the first date selected in the slicer!
Like in this picture... => % of First Selected Date's Total
So to achieve this create these 4 MEASURES
Total Value = SUM ( Table[Value] )
First Date = CALCULATE ( FIRSTNONBLANK ( Table[Date], 1 ), ALLSELECTED ( Table ) )
First Value =
CALCULATE (
[Total Value],
FILTER ( ALLSELECTED ( Table ), Table[Date] = [First Date] )
)
% MEASURE = IF ( HASONEVALUE ( Table[Date] ), DIVIDE ( [Total Value] - [First Value], [First Value], 0 ) )Hope this helps.
Good Luck! :smileyhappy:
- 9 years ago
Very good! Very good!
Thank you very much!!!
Sean
9 years agoCommunity Champion
brunoguedesOkay so you want the percent calculated ALWAYS from the first date selected in the slicer!
Like in this picture... => % of First Selected Date's Total
So to achieve this create these 4 MEASURES
Total Value = SUM ( Table[Value] )
First Date = CALCULATE ( FIRSTNONBLANK ( Table[Date], 1 ), ALLSELECTED ( Table ) )
First Value =
CALCULATE (
[Total Value],
FILTER ( ALLSELECTED ( Table ), Table[Date] = [First Date] )
)
% MEASURE = IF ( HASONEVALUE ( Table[Date] ), DIVIDE ( [Total Value] - [First Value], [First Value], 0 ) )
Hope this helps.
Good Luck! :smileyhappy:
brunoguedes
9 years agoFrequent Visitor
Very good! Very good!
Thank you very much!!!