Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Write Table now available in Qlik Cloud Analytics: Read Blog
cancel
Showing results for 
Search instead for 
Did you mean: 
Kelliesy
Contributor III
Contributor III

How to get YoY by Quarter by Product Change

I've read and tried every post I could find and every suggestion AI told me but I cannot find a way to show, in a pivot table, the YoY % by Quarter to display.  Here is my outline,

Pivot table with Quarter as the Column and Product as the Row.  Starts at 1/1/2024 and ends with 7/1/2025.  For the 1/1/2024 column I want to see the YoY % change from 1/1/2023 - 1/1/2024 and so on.  I've built a master calendar that has PreviousLastQuarter based off the Quarter, I've got a flag in that calendar for QuartersBack.  Neither seem to work no matter how I use them in my logic.  I've also tried Above and Rangesum but both only work if I have just Quarter on a table.  

I have wrote some logic in the load script that will give me what I want but it's very manual and I keep reading that this is simple if you use a master calendar but I cannot figure out how.  Anyone have any suggestions?  This is Qlik Sense SaaS

Labels (2)
1 Solution

Accepted Solutions
rubenmarin

Hi, possible solutions to this may vary based on data volume, complexity of data and possible selections.

If there is none or only a few fields with few fields to make selections, you can precalculate the differences, but this is not very usual.

For smal data volumes you can load your data adding 3 months or one year to th dates and changin the fact field names. for example having a Date and a Sales field, you can load from this table adding a year to the date and reming the field as SalesLY, so for the same dates, you have the sales of the last year in a differents field (and rows).

A step forward in the previous solution can be doing a group by to have all data in the same rows.

A most flexible solution is to use an as-of table, here is an article that explains how it works: https://community.qlik.com/t5/Design/The-As-Of-Table/ba-p/1466130

View solution in original post

1 Reply
rubenmarin

Hi, possible solutions to this may vary based on data volume, complexity of data and possible selections.

If there is none or only a few fields with few fields to make selections, you can precalculate the differences, but this is not very usual.

For smal data volumes you can load your data adding 3 months or one year to th dates and changin the fact field names. for example having a Date and a Sales field, you can load from this table adding a year to the date and reming the field as SalesLY, so for the same dates, you have the sales of the last year in a differents field (and rows).

A step forward in the previous solution can be doing a group by to have all data in the same rows.

A most flexible solution is to use an as-of table, here is an article that explains how it works: https://community.qlik.com/t5/Design/The-As-Of-Table/ba-p/1466130