Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Claudiu_Anghelescu
Specialist
Specialist

Concatenate Period with TOTAL PY

Hello, I need to concatenate my Periods Month with a Total of Previous Year in a chart/table. I already tried to concatenate as below at data model level but I cannot show correctly in the chart the data.

Table1:

LOAD .... ,

Month;

 

Concatenate

 

LOAD

'TOTAL PY' as Month;

 

Also I tried to create a variable for TOTAL PY and after to show with sum(if() but not work.

To help community find solutions, please don't forget to mark as correct.
Labels (2)
2 Replies
Vegar
MVP
MVP

It might be that all you months are numeric but the last aggregated one. I assume that your month is defined with monthname() in the script.

Try to adjust your code to this.
Dual('TOTAL PY', monthname( makedate(2018,12) ) ) as Month

This will give TOTAL PY the numeric value of December 1 2018.
Claudiu_Anghelescu
Specialist
Specialist
Author

The point is that I need this TOTAL PY dinamcally.
For example when I select 2019 I have TOTAL PY for 2018 and all the Months of 2019,
when I select 2018 I have TOTAL PY for 2017 and all the Months of 2018 ...
To help community find solutions, please don't forget to mark as correct.