Forum Discussion
Day to Day difference
- 4 years ago
Hi Solle ,
According to my knowledge, this situation may be caused by the filter "Date Calendar".
Please try to use the slicer instead of the filter and then test the following measure:
Measure_Previous Visible Date MV = VAR ___currentDate = MAX( 'Date Table'[Date] ) VAR ___previousVisibleDate = CALCULATE ( MAX ('Date Table'[Date] ), FILTER(ALL('Date Table'), 'Date Table'[Date] < ___currentDate)) VAR ___previousVisibleDateMV = CALCULATE ( [Measure_MarketValue], Filter('Date Table', 'Date Table' [Date] = ___previousVisibleDate )) RETURN IF ( NOT ISBLANK( [Measure_MarketValue] ), ___previousVisibleDateMV )Measure_MV DtD = IF(NOT ISBLANK([Measure_Previous Visible Date MV]), [Measure_MarketValue] - [Measure_Previous Visible Date MV])If this does not work, please provide me with more details about your table and your problem or share me with your pbix file after removing sensitive data.
Refer to:
How to provide sample data in the Power BI Forum
How to Get Your Question Answered Quickly
Best Regards,
Jianbo Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi Solle ,
According to my knowledge, this situation may be caused by the filter "Date Calendar".
Please try to use the slicer instead of the filter and then test the following measure:
Measure_Previous Visible Date MV =
VAR ___currentDate = MAX( 'Date Table'[Date] )
VAR ___previousVisibleDate =
CALCULATE (
MAX ('Date Table'[Date] ),
FILTER(ALL('Date Table'),
'Date Table'[Date] < ___currentDate))
VAR ___previousVisibleDateMV =
CALCULATE ( [Measure_MarketValue],
Filter('Date Table',
'Date Table' [Date] = ___previousVisibleDate
))
RETURN
IF ( NOT ISBLANK( [Measure_MarketValue] ), ___previousVisibleDateMV )
Measure_MV DtD =
IF(NOT ISBLANK([Measure_Previous Visible Date MV]),
[Measure_MarketValue] - [Measure_Previous Visible Date MV])
If this does not work, please provide me with more details about your table and your problem or share me with your pbix file after removing sensitive data.
Refer to:
How to provide sample data in the Power BI Forum
How to Get Your Question Answered Quickly
Best Regards,
Jianbo Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi v-jianboli-msft ,
Sorry for the late reply I was on holiday! But that solved my issue, appreciate your help alot thank you!
Do you know how to generate a monday to monday difference for each week (please be aware that the data is aggregated in the weekly view) So I have the total amount for the whole week on monday so it should just subtract current monday vs last week monday values (not sum the values)
I have attached an Excel print
Best Regards,
Solle