Forum Discussion
Calculate Value Change / Value Difference between given Dates
- Anonymous4 years ago
Hi nexaframe ,
Please refer to my pbix file to see if it helps you.
Create a table.
Table 2 = VALUES('Table'[ReportDate])Then put the table 2 [reportdate] into the column filed.
Create two measures.
Measure = VAR _oreplrblank = CALCULATE ( MAX ( 'Table'[Value] ), FILTER ( ALLSELECTED ( 'Table' ), 'Table'[Type] IN VALUES ( 'Table'[Type] ) && 'Table'[ReportDate] IN VALUES ( 'Table 2'[ReportDate] ) ) ) VAR _harereplace = IF ( _oreplrblank = BLANK (), 0, _oreplrblank ) RETURN _harereplaceMeasure_2 = VAR _DATEBEFORE = CALCULATE ( MAX ( 'Table 2'[ReportDate] ), FILTER ( ALL ( 'Table 2' ), 'Table 2'[ReportDate] < MAX ( 'Table 2'[ReportDate] ) ) ) VAR _VALUEBEFORE = CALCULATE ( [Measure], FILTER ( ALL ( 'Table 2' ), 'Table 2'[ReportDate] = _DATEBEFORE ) ) RETURN [Measure] - _VALUEBEFOREBest Regards
Community Support Team _ Polly
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi nexaframe ,
It works well. Could you please provide your pbix file without privacy information for me to study?
"The "total" calculation is not working."
Please refer to it.
Or create a measure base on measure_2.
Measure_3 =
VAR _a = [Measure_2]
VAR _b =
SUMMARIZE ( 'Table', 'Table'[Type], "aaa", [Measure_2] )
RETURN
IF ( ISINSCOPE ( 'Table'[Type] ), _a, SUMX ( _b, [aaa] ) )
Best Regards
Community Support Team _ Polly
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- nexaframe4 years agoFrequent Visitor
Hello and thank you again,
as I can't find a solution to upload it here, I can share it via this link: here
- Anonymous4 years agoNot applicable
Hi nexaframe ,
We have create a table2 before.
Then put the table 2 [reportdate] into the column filed in the matrix!
Best Regards
Community Support Team _ Polly
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.