Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I need to reflect in a column graph (stacked) how many helpdesk jobs are completed on time, completed late and still outstanding. So far through a calculated dimension I've managed to show number of jobs completed late and on time by using the following if statement:
=if (FINISH_DATE >> DUE_DATE, 'Late','On time')
When I used if...elseif...else...end if I couldn't make it work, it tells me I've got garbage expression. What can I do if I have more than two options to display?
Many thanks in advance
You can nest if statements:
if( condition1,
result1,
if( condition2,
result2,
result3)
)
You can nest if statements:
if( condition1,
result1,
if( condition2,
result2,
result3)
)
genius! thank you so much!
Hi,
I have a similar problem and didn't want to start a new discussion just for it. This is what I have and it seems fine till the second IF and after that apparently it's 'garbage'. It is an expression in a straight table:
if(
YEAR_END_NUMBER = 12
AND
month(CAL_DATE) > 3
AND
month(CAL_DATE) < 7 ,
sum(IM*GB)),
if (
YEAR_END_NUMBER <> 12
AND
month(CAL_DATE) > YEAR_END_NUMBER + 3
AND
month(CAL_DATE) < YEAR_END_NUMBER + 7,
sum(IM*GB),
'no data')
Try it like this:
if(
(YEAR_END_NUMBER = 12
AND
month(CAL_DATE) > 3
AND
month(CAL_DATE) < 7 )
OR
( YEAR_END_NUMBER <> 12
AND
month(CAL_DATE) > YEAR_END_NUMBER + 3
AND
month(CAL_DATE) < YEAR_END_NUMBER + 7
),
sum(IM*GB),
'no data')
Thank you! This worked fine
By the way, why does it not work for calculated dimension? Is it for calculated expressions only?