Skip to main content
Announcements
Customer Spotlight: Discover what’s possible with embedded analytics Oct. 16 at 10:00 AM ET: REGISTER NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
dhasharadh
Creator III
Creator III

Need Help in if condition(Calculated Dimension)....??

Hi All.

1. if division is Excutive then we have to disply EC name as  CEO.

 

2. if EC name is null then -- we have to display EC name as Visitors/Others.

can any correct the below condition which we are using as a calculated dimension please as per the above seanario...

 

if(ISNULL[EC Name]= 'Visitors/Others',(if(Division) = ‘Executive’, CEO))

EC Name is 'N/A'  so we are considering it as NULL..

 

 

6 Replies
olivierrobin
Specialist III
Specialist III

if(division='Executive',

CEO,

if(len(trim([EC Name])=0 or [Ec Name]='N/A',

'Visitors/Others',

[EC Name]

)

)

dhasharadh
Creator III
Creator III
Author

Thanks Robin,

But getting syntax error.

if(division='Executive','CEO',if(len(trim([EC Name])=0 or [Ec Name]='N/A','Visitors/Others',[EC Name])))

i have verified couple of times all braces are closed properly, No idea why am getting that.

olivierrobin
Specialist III
Specialist III

right parenthesis missing in len(trim( ......

and the last one is to be suppressed

if(division='Executive','CEO',if(len(trim([EC Name]))=0 or [Ec Name]='N/A','Visitors/Others',[EC Name]))

dhasharadh
Creator III
Creator III
Author

Thanks again, but still getting some counts under null category.

we want those counts as well under 'Visitors/Others' only. Can you change the expression please.

olivierrobin
Specialist III
Specialist III

you have to check the values of Ec Name concerned so you can add the needed condition in the statement

vishsaggi
Champion III
Champion III

Can you show use the list of values coming from your field EC Name?