Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
It's a quick and simple one today:
Sum(IF(Comp_Competitor like $(CompetitorName) & '*', Comp_MediaSpend))
How can I write this so qlikview will understand?
Example variable value is "Tesco"
Example working expression is:
Sum(IF(Comp_Competitor like 'Tesco*', Comp_MediaSpend))
Could someone help me convert the above working expression to replace 'Tesco*' with a variable I've specified in the load script?
Many thanks,
James.
=Sum(IF(WildMatch(Comp_Competitor, $(CompetitorName) & '*'), Comp_MediaSpend))
=Sum(IF(WildMatch(Comp_Competitor, $(CompetitorName) & '*'), Comp_MediaSpend))
Sum(IF(Wildmatch(Comp_Competitor,'Tesco*'),Comp_MediaSpend)
something like the above should work
Edit damn u tresco u too fast this early in the morning!!!
And, if you don't include single qoutes in variable declaration, you might have to do it here like:
=Sum(IF(WildMatch(Comp_Competitor, '$(CompetitorName)' & '*'), Comp_MediaSpend))
Note the quates around variable expansion.
Marked as helpful simply for the speed
Cheers bud,
James.
Hi jwaller,
example for you with if and with set analysis.
regards
Darek