Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
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

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

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

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