Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Set expression with variable syntax question or a small issue

Hi,

I have inherited one app with a expression syntax that I do not know how to handle.

It is a WTD calculation and works fine this is the expression :

Sum( $(v_Filter_WTD) Sales )/1000000

This is the expression in the variable

{$<DateKey={"$(='>=' & '$(v_StartOfWeek)' & '<=' & '$(v_EndOfWeek)')"},Year=,Month=,Week=,Day=,fYear=>}

So in the calculation I need to add an filter, so I want to add for example StoreNo = 55 into the expression.

I have not managed todo so.

Any hints?

Message was edited by: Birkir Bjornsson

15 Replies
Anonymous
Not applicable
Author

Yes this works

But this means I will have to create a variable for every storeno I want to filter on.

Is it possible to use the original wtd filter and add to this syntax a storeno filter

So

Sum( $(v_Filter_WTD), StoreNo = 24) Sales ) as a Pseudo.

Is this possible?

sunny_talwar
MVP
MVP

This is exactly what I gave you

Sum({$(vTest)*<StoreNo ={'24'}>} Sales)/1000000


Where vTest is

$<DateKey = {"$(='>=' & '$(v_StartOfWeek)' & '<=' & '$(v_EndOfWeek)')"}, StoreNo ={'24'}, Year=, Month=, Week=, Day=, fYear=>

Just need to remove { and } from start and end

Anonymous
Not applicable
Author

Yes but that means for storeno 5 you would create a new vTest variable?

sunny_talwar
MVP
MVP

That is my bad....

vTest needs to be without storeNo field in it

$<DateKey = {"$(='>=' & '$(v_StartOfWeek)' & '<=' & '$(v_EndOfWeek)')"}, Year=, Month=, Week=, Day=, fYear=>

sunny_talwar
MVP
MVP

Attaching the updated sample (sorry about that)

Anonymous
Not applicable
Author

Hey Sunny

You are a genious this works, thank you so much for your help and the effort.

Regards

Birkir