Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello Qlik-Community,
I´m working on the following issue.
I have a table with certain business units and want to create two KPI in a table next to each other:
1. Turnover per Business Unit YTD (no problem)
2. Turnover per Business Unit previos Year until Month(today())
It should look like this:
Business Unit | Turnover YTD | Turnover prev. YTD (until Month(today())) |
A | 1000 | 800 |
B | 5000 | 6000 |
C | 3000 | 3500 |
D | 200 | 400 |
For the first bullet point my syntax looks as follows (I´m including and excluding certain parameters)
SUM(
{< V_BelegKopf.BelegArt={"C","I"},
[MASTER_CAL.Year]={'$(=Year(Today()))'},
[Client.Clientnumber] -={'0815'},
[Parts.Partgroup]-={'4711',1234','7896'},
[Client.Country]={'DE','AT', 'CH', 'LU'} >}
[Document.Total])
It creates the desired output per each busines unit in the table.
For the second bullet point/third row I tried the following:
SUM({<
{< V_BelegKopf.BelegArt={"C","I"}, ,
[MASTER_CAL.Year]={'$(=Year(Today())-1)'},
[MASTER_CAL.Month]={"<=$(=Month(Today()))"},
[Client.Clientnumber] -={'0815'},
[Parts.Partgroup]-={'4711',1234','7896'},
[Client.Country]={'DE','AT', 'CH', 'LU'} >}
[Document.Total])
It results in NULL-Values.
I tried also different versions including a range from Yearstart, changed " to ', did Month(addyears(today(),-1)) as parameter and a lot more. Nothing worked.
Addtionally I have a Graph to compare absolute and relative the differnces between both values with the additional dimension of the month (To display the difference by month) and the basic IF-Condition:
IF(MONTH(TODAY())>=[MASTER_CAL.Month] worked and only shows the months until today.
Copying that before the SUM()-Set is not working as well.
Thereof I´m looking for your support. Thank you in advance!
@AndreSchwarze
Ensure there are no extra commas or misplaced brackets in your set analysis.
SUM(
{< V_BelegKopf.BelegArt={"C","I"},
[MASTER_CAL.Year]={'$(=Year(Today())-1)'},
[MASTER_CAL.Month]={"<=$(=Month(Today()))"},
[Client.Clientnumber] -={'0815'},
[Parts.Partgroup]-={'4711','1234','7896'},
[Client.Country]={'DE','AT','CH','LU'} >}
[Document.Total])
I corrected the original question. It was a mistake as I was typing instead of copy&pasting from my original code. Thank you for pointing that out.
@AndreSchwarze If you have date in your calendar, try below
Date ={">=$(=yearstart(addyears(today(),-1)))<=$(addyears(today(),-1))"}