Forum Discussion
Anonymous
6 years agoNot applicable
YoY Quick Measure - Date Issue
Hello, I am trying to calculate Sales $ year over year change. I have my data by year however, the app will not allow me to add any data into the date field. I have read multiple articles and the...
- 6 years ago
Hi Anonymous ,
Try measure like this:
Measure = VAR year = MAX ( 'Table'[year] ) VAR last_year_sale = CALCULATE ( FIRSTNONBLANK ( 'Table'[sales], 1 ), FILTER ( ALLEXCEPT ( 'Table', 'Table'[vendor] ), 'Table'[year] = year - 1 ) ) RETURN DIVIDE ( MAX ( 'Table'[sales] ), last_year_sale )Best Regards,
Liang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly. - 6 years ago
Sorry guys the Divide formula must be looking like this
Sorry again
Regards
V-lianl-msft
6 years agoCommunity Support
Hi Anonymous ,
Try measure like this:
Measure =
VAR year =
MAX ( 'Table'[year] )
VAR last_year_sale =
CALCULATE (
FIRSTNONBLANK ( 'Table'[sales], 1 ),
FILTER ( ALLEXCEPT ( 'Table', 'Table'[vendor] ), 'Table'[year] = year - 1 )
)
RETURN
DIVIDE ( MAX ( 'Table'[sales] ), last_year_sale )
Best Regards,
Liang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
aj1973
6 years agoCommunity Champion
Hi V-lianl-msft
Just to add a little detail : you need to divide Max ('Table'[Sales]) / 100 to get the correct result
Amine
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- aj19736 years agoCommunity Champion
Sorry guys the Divide formula must be looking like this
Sorry again
Regards