Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi
I have data for two years Sales ..
I need to display them in a single graph(Line graph) to compare this year sales with last year sales..
The current year has not ended, it has few more months left
I used Set Analysis,the following expressions used as in User manual.it does not yield the desired output i expected
=Sum({$<Year={$(=Only(Year))}>} [Sales Amount]) - Sum({$<Year={$(=Only(Year)-1)}>} [Sales Amount])
Attaching the graph which i get while using this expression & the desired output


Any help is appreciated in resolving this..
Regards
Works for me. See attached example.
Read this document if you need more help: Preparing examples for Upload - Reduction and Data Scrambling
sum({$<year={"$(=only(year))"}>}sales) //current year
sum({$<year={"$(=only(year)-1)"}>}sales) //last year
sum({$<year={"$(=only(year))"}>}sales)-sum({$<year={"$(=only(year)-1)"}>}sales) //difference between the year
Hi,
If you want to compare the value of current year till current month then used the following expression.
FISCAL_MONTHNum is Months in numeric
Sum({$<YEAR = {"$(=Max(YEAR ))"}, FISCAL_MONTHNum={"<$(=num(Month(Today())))"}>} [Sales Amount])
Sum({$<YEAR = {"$(=Max(YEAR )-1)"}>} [Sales Amount])
Regards,
Nirav Bhimani
Tried out with the same it displays "No data to display"
Any help is appreciated in this regard..
Hi
Why do you use Set analysis ?
You can use Year as dimension (or calculated dimension to display only last 2) and Month as dimension as well
Amount will be displayed along all the months from jan to dec
best regards
Chris