Forum Discussion
Calculate absolute profitability
- 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!!!
Thank you for your attention,
Did not work, the result should be like the one highlighted in the blue picture. Its result was like the columns highlighted in red. I need the% value to always depart from 0 in the first row - after filtering the date.
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:
- brunoguedes9 years agoFrequent Visitor
Very good! Very good!
Thank you very much!!!
- brunoguedes9 years agoFrequent Visitor
brother,
I need to calculate interest accrued in the period, but now it will not start from the '' zero ''. Can you help me?