Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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:
When the financial year is 2022, I want a single row that shows:
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!
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;