Skip to main content
Announcements
SYSTEM MAINTENANCE: Thurs., Sept. 19, 1 AM ET, Platform will be unavailable for approx. 60 minutes.
cancel
Showing results for 
Search instead for 
Did you mean: 
mahendra937
Partner - Contributor
Partner - Contributor

Consolidating Current Year and Previous Year Sales in a Single Row in Qlik Sense

Hello Qlik Community,

I'm facing an issue with creating a table in Qlik Sense. I want to display both the current year's sale and the previous year's sale in a single row, based on the financial year selected. However, I'm currently getting two separate rows, which is not what I desire.

Here's my specific requirement:

  1. When the financial year is 2022, I want a single row that shows:

    • Current Year Sale: 15
    • Previous Year Sale: 10
  2. Furthermore, I would like the Previous Year Sale value to be visible without selecting financial year Slicer.

In summary, I'm trying to achieve a table where both current and previous year sales are included in a single row based on the selected financial year, and the previous year's value is only visible when a financial year is selected.

Any guidance or Qlik Sense script examples to achieve this would be greatly appreciated. Thank you in advance for your help!

1 Reply
Mark_Little
Luminary
Luminary

Hi,

Say you are doing this at the SKU level.

CrPrYearbalance

LOAD,

SKU,

SUM(Sales)

Where Year = YEAR(Today())

Group by SKU

Resident Table;

Left Join (CrPrYearbalance)

LOAD,

SKU,

SUM(Sales)

Where Year = YEAR(ADDYEARS(Today(),-1))

Group by SKU

Resident Table;