Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I created a bar chart which displays current year and previous year MTD.
I need to show the difference between the 2 values. Couldn’t figure out a way add this to the chart, so I added it to the title.
Anyone has an idea?
The dimension is Year
The bar expression:
Sum({<[Calendar.Year] ={">=$(vPrevYear)<=$(vMaxYear_1)"},[Calendar.MonthNum] = {'$(vMaxMonth_1)'}, [Calendar.Day] = {"<=$(vMaxDay_1)"}>}Customers_Count)
The difference expression:
($(v_CustCount_MTD_Dashboard)
/
$(v_CustCount_PMTD_Dashboard) )
-1,'#,##0%')
Thanks!
Set Analysis happens before the data gets calculated over the dimensions. You can't do value of Dimension A vs Dimension B, while the Dimension is in the chart, unless you use inter-record functions, like Above() or change the model.
Here is how you can do it using Above().
Sum({<[Calendar.Year] ={">=$(vPrevYear)<=$(vMaxYear_1)"},[Calendar.MonthNum] = {'$(vMaxMonth_1)'}, [Calendar.Day] = {"<=$(vMaxDay_1)"}>}Customers_Count)
/
Above(Sum({<[Calendar.Year] ={">=$(vPrevYear)<=$(vMaxYear_1)"},[Calendar.MonthNum] = {'$(vMaxMonth_1)'}, [Calendar.Day] = {"<=$(vMaxDay_1)"}>}Customers_Count))
You should probably include year 2018 as well, so 2019 has a comparison value. If you uncheck 'Include zero Values' in the Add-Ons section, it will hide 2018 from the chart and only show 2019 & 2020, which the comparison %.
Set Analysis happens before the data gets calculated over the dimensions. You can't do value of Dimension A vs Dimension B, while the Dimension is in the chart, unless you use inter-record functions, like Above() or change the model.
Here is how you can do it using Above().
Sum({<[Calendar.Year] ={">=$(vPrevYear)<=$(vMaxYear_1)"},[Calendar.MonthNum] = {'$(vMaxMonth_1)'}, [Calendar.Day] = {"<=$(vMaxDay_1)"}>}Customers_Count)
/
Above(Sum({<[Calendar.Year] ={">=$(vPrevYear)<=$(vMaxYear_1)"},[Calendar.MonthNum] = {'$(vMaxMonth_1)'}, [Calendar.Day] = {"<=$(vMaxDay_1)"}>}Customers_Count))
You should probably include year 2018 as well, so 2019 has a comparison value. If you uncheck 'Include zero Values' in the Add-Ons section, it will hide 2018 from the chart and only show 2019 & 2020, which the comparison %.
It works! Thank you very much!
No need to add 2018.
The only issue is the visibility: the point hides the bar's value and I the value of the point is not displayed..