Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I am new to Qlik Sense and could really need your help. I have a combo chart that shows hours per week . The bars shows the actual hours per week and the line shows targeted hours.
I want to show the 10 latest weeks.
My problem is, for actual hours I have data until w 43 this year but for the target I have data until w 52 in 2020.
I want to show week 35 - 43 but not show the weeks before or after.
My measure looks like this for actuals (the bar):
sum({<Scenario_W={Actual}>} HpT_W )
And like this for target (the line):
sum({<Scenario_W={Target}>} HpT_W )
Can anyone help me?
Hi there
I took your original expression, but the Actual and Target values may need to be in singe quotes i.e. {'Target'} and replace the [Time Field] with your actual date field.
Actual:
Sum({<Scenario_W={Actual},[Time Field] = {"=WeekName([Time Field])>WeekName(Now())-7*10 AND WeekName([Time Field])<=WeekName(Now())"}>} HpT_W)
Target:
Sum({<Scenario_W={Target},[Time Field] = {"=WeekName([Time Field])>WeekName(Now())-7*10 AND WeekName([Time Field])<=WeekName(Now())"}>} HpT_W)
Hope this helps.
Regards,
Mauritz
Hi there
I took your original expression, but the Actual and Target values may need to be in singe quotes i.e. {'Target'} and replace the [Time Field] with your actual date field.
Actual:
Sum({<Scenario_W={Actual},[Time Field] = {"=WeekName([Time Field])>WeekName(Now())-7*10 AND WeekName([Time Field])<=WeekName(Now())"}>} HpT_W)
Target:
Sum({<Scenario_W={Target},[Time Field] = {"=WeekName([Time Field])>WeekName(Now())-7*10 AND WeekName([Time Field])<=WeekName(Now())"}>} HpT_W)
Hope this helps.
Regards,
Mauritz