Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi There
I am using below set analysis in Chart Table, i want to use this at script level.
any suggestions?
IF(Country='US','N/A',sum({$<MNTH={'0'}>} [Revenue]))
thanks in advance,
Your set analysis will only filter MNTH field with a fixed value, but the aggregation will still regard other user selections.
How will you handle this in the script?
Do you want a sum of Revenue by Country (excluding US) ?
Yes , and month can be from 0 to 12.
please post sample data and expected result.
thanks
regards
Marco
Hi
Hope country, revenue and month field are available in same table.
If so, try like this
Load *,
IF(Country <> 'US' and MNTH = 0,[Revenue], 0) AS MonthZeroNonUSRevenue,
IF(Country <> 'US' and MNTH = 0,1, 0) AS MonthZeroNonUSFlag;
Exp:
=Sum({<MonthZeroNonUSFlag ={1}>}Revenue)
or
=Sum(MonthZeroNonUSRevenue)
Else, please post sample data and required output.
If Country, Month, Revenue field are in same table, then this should work:
at script table:
IF(Country='US','N/A',if(Month='0', sum(Revenue)))
Try This :
IF(Country='US','N/A',if(Month='0',Revenue)) as Revenue1
then summation you can do on the dashboard as sum(Revenue1)
Thanks
Khushboo
hi Ashish
try this
IF(wildmatch(Country,'US')=0,'N/A',if(Month='0', sum(Revenue)))
hope this help you
Regards
Ahmar
Hi
As per my knowledge we can't use set expression in qlikview scripting.
Try something like using groupby clause.
or you can follow what khushboo suggested.
Regards
Tripati