Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi everyone,
I have been having some trouble generating an expression that outputs a percentage comparing YTD sales to LYTD sales. Currently my expression is comparing jan-dec 2016 sales to jan-sept 2017 sales, and I would like it to compare jan-sept 2016 and 2017. Please let me know if you need any clarification. My current equation is provided below.
=IF(sum( {$<Year = {$(#=Only(Year)-1)}>}[Total Sales])=0,'N/A', Round((sum([Total Sales])/sum( {$<Year = {$(#=Only(Year)-1)}>}[Total Sales])*100)-100,0.01) & '%')
Thanks!
You can try below expresion.
=IF(sum( {$<Year = {$(#=Only(Year)-1)}>}[Total Sales])=0,'N/A', Round((sum([Total Sales])/sum( {$<Year = {$(#=Only(Year)-1)},Month = {"<=$(=Max({<Year = {$(#=Only(Year))}>}Month))"}>}[Total Sales])*100)-100,0.01) & '%')
Regards,
Kaushik Solanki
You can try below expresion.
=IF(sum( {$<Year = {$(#=Only(Year)-1)}>}[Total Sales])=0,'N/A', Round((sum([Total Sales])/sum( {$<Year = {$(#=Only(Year)-1)},Month = {"<=$(=Max({<Year = {$(#=Only(Year))}>}Month))"}>}[Total Sales])*100)-100,0.01) & '%')
Regards,
Kaushik Solanki
Had to change 'Month' to '[Period Num]' and it worked. Thank you!
Great.
Regards,
Kaushik Solanki