Forum Discussion
Difference day over day - column chart
- Anonymous1 year ago
Hi, Anonymous
Thanks for Idrissshatila's reply. You can try his reply, or you can try the following dax.Table 2 = DISTINCT( SELECTCOLUMNS( 'Table', "Report Date",'Table'[Report date], "Counts",'Table'[Column] ) ) Index = RANKX(ALL('Table'),VALUE(FORMAT([Report Date], "YYYYMMDD")),,ASC,Dense) Diff = VAR _PreviousCounts = CALCULATE( MAX('Table 2'[Counts]), ALL('Table 2'), 'Table 2'[Index] = EARLIER('Table 2'[Index]) -1 ) RETURN IF(_PreviousCounts<>BLANK(),'Table 2'[Counts] - _PreviousCounts)Best Regards,
Yang
Community Support TeamIf there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!How to get your questions answered quickly -- How to provide sample data in the Power BI Forum
Hi, Anonymous
Thanks for Idrissshatila's reply. You can try his reply, or you can try the following dax.
Table 2 =
DISTINCT(
SELECTCOLUMNS(
'Table',
"Report Date",'Table'[Report date],
"Counts",'Table'[Column]
)
)
Index =
RANKX(ALL('Table'),VALUE(FORMAT([Report Date], "YYYYMMDD")),,ASC,Dense)
Diff =
VAR _PreviousCounts =
CALCULATE(
MAX('Table 2'[Counts]),
ALL('Table 2'),
'Table 2'[Index] = EARLIER('Table 2'[Index]) -1
)
RETURN
IF(_PreviousCounts<>BLANK(),'Table 2'[Counts] - _PreviousCounts)
Best Regards,
Yang
Community Support Team
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!
How to get your questions answered quickly -- How to provide sample data in the Power BI Forum