Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi
I have a lot of work centers in my file: PM-TECH, PM-PRO, PM-OFF, AM-SLIT, AM-DOCT and many more.
I want to use work center as dimension in a chart but I want to filter out PM-TECH and all that starts with AM.
Can i do like this in my script?
IF([Main WorkCtr]='PM-TECH','PM','AM') as Workcenter
Will it work so it's not counting with PM-PRO and PM-OFF, only PM-TECH and all AM?
Best regards
/Mats
Hi Mats,
Can you try this again
=If(WildMatch(Workcenter,'*AM*'),'AM',
If(Workcenter='PM-TECH','PM',Null()))
Regards,
Sokkorn
you can use Calculated Dimension in the front end. use expression:
IF([Main WorkCtr] not LIKE 'AM*' or [Main WorkCtr] <>'PM-TECH', [Main WorkCtr])
Thanks.
Hi!
Try something like that:
Sum ({$<WorkCenter = WorkCenter - {'PM-TECH'} - {"AM*"} >} 1)
Hi all and thanks for your (very quick!) answers.
I have tried them all with or without more or less success...
I get something like this in my graph:
but i would like it to be like this:
Just a difference between PM-TECH (PM-PRO and the other PM's should not count) and all AM together.
My expression is clear so i don't want to touch that, it must be done in the script or in the dimension.
/Mats
Hi Mats,
Did you try "Calculated Dimension" yet? In your pie chart use this calculated dimension
=If(WildMatch(Workcenter,'*AM*','AM',
If(WildMatch(Workcenter,'*PM*','PM')))
Regards,
Sokkorn
Hi
I get an error if i try this
I have tried to put in ,1 and ,0 where the mark is but then my chart is all black.
It looks fine when i do like i described from the start;
IF
([Main WorkCtr]='PM-TECH','PM','AM') as Workcenterbut i im not sure if it's showing the right result.
/Mats
= if (WildMatch (Workcenter, 'AM*') > 0,
'AM',
if (WildMatch (Workcenter, 'PM*') > 0,
'PM',
'Others'
)
)
Hi Mats,
Oop sorry my fault.
Use this one
=If(WildMatch(Workcenter,'*AM*'),'AM',
If(WildMatch(Workcenter,'*PM*'),'PM'))
Regards,
Sokkorn
Try this
if(pick(WildMatch(Workcenter,'*AM*'),'AM') or
pick(WildMatch(Workcenter,''PM-TECH'),'PM'),Workcenter)
Hi and thx.
This works but the problem is that all PM is counted. It is just the workcenter with the name 'PM-TECH' that should be accounted for.
/Mats