Forum Discussion
Day to Day average
- 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 ) )
Hi fbostan1,
I am assuming Life Total is a DAX measure, am I correct?
Can you please explain what you mean by "Day to Day average" ?
Thanks
If this helped, please consider giving kudos and mark as a solution
@me in replies or I'll lose your thread
Want to check your DAX skills? Answer my biweekly DAX challenges on the kubisco Linkedin page
Consider voting this Power BI idea
Francesco Bergamaschi
MBA, M.Eng, M.Econ, Professor of BI
- FBergamaschi7 months ago
Super User
OK, assuming you have a model involving a Date table called Date and a column Date in it (Date[Date]), connected to your fact table, you can define this measure
Delta =
VAR _LifeTotalCurrentDate = [Life Total]
VAR _LifeTotalPreviousDate = CALCULATE ( [Life Total], DATEADD ( Date[Date], -1, DAY ) )
RETURN
DIVIDE ( _LifeTotalCurrentDate - _LifeTotalPreviousDate, _LifeTotalPreviousDate )If you are not using a date table, please let me know, in that case I need to see the model tables and the relationships, to link them to how you arranged the visual
If this helped, please consider giving kudos and mark as a solution
me in replies or I'll lose your thread
Want to check your DAX skills? Answer my biweekly DAX challenges on the kubisco Linkedin page
Consider voting this Power BI idea
Francesco Bergamaschi
MBA, M.Eng, M.Econ, Professor of BI
- fbostan17 months ago
Helper I
this is single table, I just want to get day to day percentage for this chart
for example: on Life Total column, (11,214,592-10,193,377)/10,193,377 to get a percentage of 10.01% for Day Count 1
- Ashish_Mathur7 months ago
Super User
Hi,
Share the download link of the PBI file.