Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
There are 4 text values: A, B, C and D for the field [Current Status]
In a bar chart I'm trying to combine the text values of those with A or B to be shown as 'Both' but also show those that have only A as 'Just A', which is where I'm having issues, examples of expressions below.
=if([Current Status]='A' OR [Current Status]='B','Both',if([Current Status]= 'A','Just A',[Current Status]))
//correct for Both but doesn't show Just A
//if([Current Status]= 'A','Just A',if(([Current Status]='A' OR [Current Status]='B'),'Both',[Current Status]))
//correct for Just A but Both only displays the number in B and not the combined total
Hi @cooksa
Try like below
Create dummy field in script
Dummy:
Load * Inline
[
Dim
1
2
];
Load * Inline
[
Current Status
A
B
C
D
];
In Bar chart, try with below expression and check the "Suppress When Value is Null".
=if(Dim = 1, If([Current Status]='A' OR [Current Status]='B','Both'),if([Current Status]= 'A','Just A',[Current Status]))
Sample output:
Hi @cooksa
Try like below
Create dummy field in script
Dummy:
Load * Inline
[
Dim
1
2
];
Load * Inline
[
Current Status
A
B
C
D
];
In Bar chart, try with below expression and check the "Suppress When Value is Null".
=if(Dim = 1, If([Current Status]='A' OR [Current Status]='B','Both'),if([Current Status]= 'A','Just A',[Current Status]))
Sample output:
Thank you, that's great