Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi I am trying to create a button and KPI's using ID's.
I have ID's starting with ABxxxxx, ABCxxxxx, INxxxx, INNxxxx
I want to display IN* and AB* but I should not include IDs starting with ABC*.
I am trying to do something like,
=if( wildmatch( ID,'AB*','IN*'),ID) -- But this includes ABC* also, how to avoid that ?
Thanks in advance
if( wildmatch( ID,'AB*','IN*') and not wildmatch( ID,'ABC*'),ID)
I think it could be useful to put this logic in the script: Create a flag that indicates whether the ID should be included or not:
if( wildmatch( ID,'AB*','IN*','SD*') and not wildmatch( ID,'ABC*'),1,0) as IncludeID,
Then you can manage the logic there, and you don't need to edit the expressions of several charts. Just use
Sum({<IncludeID={1}>} [Total Billing])
if( wildmatch( ID,'AB*','IN*') and not wildmatch( ID,'ABC*'),ID)
OMG! Is it that simple. Thanks a lot. 🙂 It worked
Hi
Your solution worked out. Thanks for it. But I have an issue like, I have many ID's starting with DN*, AB* ,ABC* ,IN*, SD*.
I am using the same concept in sum expression in a bar chart and KPIs like,
Sum({< ID={"AB*","IN*","SD*"}, ID -={"ABC*"}, [Total Billing] -={0}>}[Total Billing]) -- This includes the billing of other ID's also.
I want to show the sum for only ID's starting with AB*, IN*, SD* .
Any help.
Thanks.
then it also includes SD*,
I think it could be useful to put this logic in the script: Create a flag that indicates whether the ID should be included or not:
if( wildmatch( ID,'AB*','IN*','SD*') and not wildmatch( ID,'ABC*'),1,0) as IncludeID,
Then you can manage the logic there, and you don't need to edit the expressions of several charts. Just use
Sum({<IncludeID={1}>} [Total Billing])