Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I am trying to calculate the difference between two year to show the results as a KPI (evolution throughout the year N and N-1).
This is what I tried to do, but it doesn't work and I can't really find out what's wrong with it since I am not really used to this language (I am way more used to Power BI which is working with DAX Language).
Here is what I wrote :
SUM({<[sales_specialoffer.StartDate.autoCalendar.Year] *= {'2013'}>}count(SpecialOfferID])-
SUM({<[sales_specialoffer.StartDate.autoCalendar.Year] *= {'2012'}>}count(SpecialOfferID]))
Thanks for your replies !
Try below
count({<[sales_specialoffer.StartDate.autoCalendar.Year] = {'2013'}>} SpecialOfferID]) -
count({<[sales_specialoffer.StartDate.autoCalendar.Year] = {'2012'}>}SpecialOfferID])
Or
count({<[sales_specialoffer.StartDate.autoCalendar.Year] = {'2013'}>} DISTINCT SpecialOfferID]) -
count({<[sales_specialoffer.StartDate.autoCalendar.Year] = {'2012'}>} DISTINCT SpecialOfferID])