Forum Discussion
fbostan1
Helper I
7 months agoDay to Day average
Could anyone help me with a measure to find out Day to Day average for Life Total Column in the screenshot below? I' apprecaite your help thanks!
- 7 months ago
Please try the following logic:
Day to Day % = VAR PrevValue = CALCULATE ( SUM ( 'Table'[Life Total] ), DATEADD ( 'Table'[Date Run], -1, DAY ) ) VAR CurrValue = SUM ( 'Table'[Life Total] ) RETURN IF ( NOT ISBLANK ( PrevValue ), DIVIDE ( CurrValue - PrevValue, PrevValue ) )
cengizhanarslan
Super User
7 months agoPlease try the following logic:
Day to Day % =
VAR PrevValue =
CALCULATE (
SUM ( 'Table'[Life Total] ),
DATEADD ( 'Table'[Date Run], -1, DAY )
)
VAR CurrValue =
SUM ( 'Table'[Life Total] )
RETURN
IF (
NOT ISBLANK ( PrevValue ),
DIVIDE ( CurrValue - PrevValue, PrevValue )
)fbostan1
Helper I
6 months agocengizhanarslan Thank you! that dax worked for this chart, and I wanted to use the same dax on one of the other charts I have in my powerbi dashboard, but it won't work because the column I want to get day to day percentage is written differently.
here is the Dax for that column:
here is the chart, I want to get the day to day percentage for the Total Diff column.
if I use the same dax you helped me with and replace the Total Securities with Total Diff, that column won't appear. I don't know why, maybe the dax is written differently.