Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi experts!
I haven't been able to find a solution to my issue on previous post.
I was wondering if there is any way to add a condition in set analysis to a variable that has already been defined.
Ie:
I am using the variable 'vSalesCountry' in a KPI. The variable has been defined and attached in an excel file:
Sum({<$(vExample), Flag_Country ={1}>}Sales)
Then I realise I would need to use the same variable 'vSalesCountry' but adding a new condition (Ie: Flag_User={1})
-Do I have to create a new variable in my excel file such as Sum({<$(vExample), Flag_Country ={1}, Flag_User={1}>}Sales)?
-Is there any way in set analysis that I could add a new filter and reuse the variable 'vSalesCountry'
I hope I explained myself clearly,still a newbie!
Thanks a lot in advance
It's called parametrized variable and it might in your case look like:
Sum({<$(vExample), Flag_Country ={$1}, Flag_User={$2}>}Sales)
and your call could be:
$(vSalesCountry(1, 1)) or $(vSalesCountry(1, '*'))
- Marcus
don't create variables as follow:
vVariable= sum({<field1={...},field2={...}>}Sales)
but as folllow : field1={...},field2={...}
With this, u can use the variable in ur expression:
sum({<$(vVariable)>}Sales)
if u want to add yet another conditon:
sum({<$(vVariable),Flag={1}>}Sales)
Hope that was clear
It's called parametrized variable and it might in your case look like:
Sum({<$(vExample), Flag_Country ={$1}, Flag_User={$2}>}Sales)
and your call could be:
$(vSalesCountry(1, 1)) or $(vSalesCountry(1, '*'))
- Marcus