Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Partner
Partner

Date and Variable in set analysis

Hello,

need somebody to hwelp me out. I have a chart and I want to show planned ad archieved turnover based on a project start year. Somehow some projects created turnover before they started. What I want to show is only the figueres created from start date on a yearly base. 

It works well for the planned turnover with this:

sum({$<KZ={"Soll"},Startjahr={$(=Only(Startjahr))}>}Umsatz)  --> Startjahr = Year when project started and it is a selected value

But it does not work for the archieved turnover:

sum({$<KZ={"Ist"},Umsatzjahr={"=>((Startjahr))"}>}Umsatz) --> Umsatzjahr = Year when turnover was created

So what I would like to see is just the years having turnover starting with the year when project was started.

Any suggest...

Thanks

7 Replies

Re: Date and Variable in set analysis

Syntax for set analysis doesn't look right...

 

Sum({$<KZ={"Ist"}, Umsatzjahr = {"=>((Startjahr))"}>} Umsatz)

What exactly are you trying to do here? Do you may be just need this?

Sum({$<KZ = {"Ist"}, Umsatzjahr = {$(=Only(Startjahr))}>} Umsatz)

 

 

Partner
Partner

Re: Date and Variable in set analysis

Hi Stalwar1,

I have a table with projects and selcted for example 2014 so I will get all projects started in 2014. In my turnover table I found some data before 2014. However I only want to see turnover that was created 2014 or later. The second set analysis works but then I get only figuers for 2014 and not for 2015, 2016,...as mentioned 2014 is my selected value for project start

Re: Date and Variable in set analysis

May be this

Sum({$<KZ = {"Ist"}, Umsatzjahr = {$(='>=' & Only(Startjahr))}>} Umsatz)
Partner
Partner

Re: Date and Variable in set analysis

get an error message with this:

Error in set modifier ad hoc element list: ',' or ')' expected

If I remove the = at the beginning there is no error but the result is 0 maybe the following screenshots will help15-11-_2018_15-49-10.png15-11-_2018_15-54-01.png

Re: Date and Variable in set analysis

My bad, try this

Sum({$<KZ = {"Ist"}, Umsatzjahr = {"$(='>=' & Only(Startjahr))"}>} Umsatz)

 

Partner
Partner

Re: Date and Variable in set analysis

Hi Stalwar1,

it works....thank you so much.

Re: Date and Variable in set analysis

Superb 🙂