Skip to main content
Announcements
Accelerate Your Success: Fuel your data and AI journey with the right services, delivered by our experts. Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
Granz03
Contributor
Contributor

Create a Year on year sales KPI

Hi haveing some issues createing this with in QS 

 

In the KPI, define a new master measure YoY Sales with the calculation of:

([Sales CY] / [Sales PY]) -1.

Where the Sales CY is the existing master measure and the Sales PY can be defined as follows:

Sum({$<Year={$(=Max(Year)-1)} , YearMonth= >} LineSalesAmount).

Use a dynamic label (YoY Sales <current year> vs. <prior year>) and display it in a KPI

Labels (3)
1 Solution

Accepted Solutions
anat
Master
Master

Previous year:

Sum({<[OrderDate.autoCalendar.Year] = {"$(=Max(Year(OrderDate)) - 1)"}>} Sales)

Current year:

Sum({<[OrderDate.autoCalendar.Year] = {"$(=Max(Year(OrderDate)))"}>} Sales)

 

It will be based on your selection to get what is the lastest(max) possible year, and minor 1 to get its previous year.

View solution in original post

2 Replies
MatheusC
Specialist II
Specialist II

@Granz03 

Try removing ignore selection  YearMonth=

Sum({$<Year={$(=Max(Year)-1)}>} LineSalesAmount)



Regarts,
Matheus

Did you find a solution to your question? Mark the solution as accepted and if you found it useful, press the like button!
anat
Master
Master

Previous year:

Sum({<[OrderDate.autoCalendar.Year] = {"$(=Max(Year(OrderDate)) - 1)"}>} Sales)

Current year:

Sum({<[OrderDate.autoCalendar.Year] = {"$(=Max(Year(OrderDate)))"}>} Sales)

 

It will be based on your selection to get what is the lastest(max) possible year, and minor 1 to get its previous year.