Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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
That is my bad....
vTest needs to be without storeNo field in it
$<DateKey = {"$(='>=' & '$(v_StartOfWeek)' & '<=' & '$(v_EndOfWeek)')"}, Year=, Month=, Week=, Day=, fYear=>
Try this:
{$<DateKey={"$(='>=' & '$(v_StartOfWeek)' & '<=' & '$(v_EndOfWeek)')"},StoreNo={'55'},Year=,Month=,Week=,Day=,fYear=>}
HTH
Sushil
Hi Sushil,
Thanks for your valid input, yes this solves this. But I was hoping to be able to have the WTD filter universal and add the StoreNo = 55
into this expression
Sum( $(v_Filter_WTD) Sales )/1000000, that I have not been able to solve.
Any ideas?
please post a sample app
May be this:
Sum({$<DateKey={"$(='>=' & '$(v_StartOfWeek)' & '<=' & '$(v_EndOfWeek)')"},StoreNo={'55'},Year=,Month=,Week=,Day=,fYear=>}
Aggr(
Sum( $(v_Filter_WTD) Sales )/1000000
, YourChartDimensionsHere)
Hi all,
Just added an sample app.
What is the expected output here?
Well the idea here would bet do add an storeno filter into the expression in the top KPI,
So for example set StoreNo = 24 should show 15.08K in the Kpi as WTD sales.
So is it somehow possible to add storeno into the set analysis using the wtd variable as is, So that could be an universal variable and then add whatever extra filters you need into the set analysis.
does that makes sense?
May be like this?
Sum({$<DateKey = {"$(='>=' & '$(v_StartOfWeek)' & '<=' & '$(v_EndOfWeek)')"}, StoreNo ={'24'}, Year=, Month=, Week=, Day=, fYear=>} Aggr(Sum( $(v_Filter_WTD) Sales )/1000000, DateKey))
or if you can define your variables like this (without the curly brackets at the start and end)
$<DateKey = {"$(='>=' & '$(v_StartOfWeek)' & '<=' & '$(v_EndOfWeek)')"}, StoreNo ={'24'}, Year=, Month=, Week=, Day=, fYear=>
then this might work
Sum({$(v_Filter_WTD)*<StoreNo ={'24'}>} Sales)/1000000
Tested the second one with a new variable called vTest