Forum Discussion
anjanikumar
Helper III
4 years agoDynamically how to write this Measure !!
Measure !! VPY = CALCULATE(BUF_DATAMART_V[AMOUNT_USD_ACTUAL],BUF_DATAMART_V[CURRENT_YEAR]=YEAR(TODAY())-2)-CALCULATE(BUF_DATAMART_V[AMOUNT_USD_ACTUAL],BUF_DATAMART_V[CURRENT_YEAR]=YEAR(TODAY())-3...
- 4 years ago
Hi, anjanikumar ;
You could create a what-if table ,then create a measure.
1.create a what-if table
Parameter = GENERATESERIES(0, 10, 1)2.create a measure .
VPY = CALCULATE ( [MOUNT_USD_ACTUAL1], FILTER('Table', 'Table'[CURRENT_YEAR] = YEAR ( TODAY () ) - [Parameter Value]))- CALCULATE ( [MOUNT_USD_ACTUAL1], FILTER('Table', 'Table'[CURRENT_YEAR] = YEAR ( TODAY () ) - [Parameter Value]-1))The final output is shown below:
Best Regards,
Community Support Team_ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
v-yalanwu-msft
Community Support
4 years agoHi, anjanikumar ;
You could create a what-if table ,then create a measure.
1.create a what-if table
Parameter = GENERATESERIES(0, 10, 1)
2.create a measure .
VPY =
CALCULATE (
[MOUNT_USD_ACTUAL1],
FILTER('Table', 'Table'[CURRENT_YEAR]
= YEAR ( TODAY () ) - [Parameter Value]))-
CALCULATE (
[MOUNT_USD_ACTUAL1],
FILTER('Table', 'Table'[CURRENT_YEAR]
= YEAR ( TODAY () ) - [Parameter Value]-1))
The final output is shown below:
Best Regards,
Community Support Team_ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.