Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
SingSing16
Contributor III
Contributor III

How I can connect Nested IFs

I have 3 dimensions which work fine idividually.

How I can create from them one big dimension (for chart)?

 

 

=if(match("CPS", 'BCL,'PTB , 'Ship', 'Instal', 'Acc', 'Clin'),
if(match("OS", 'OW', 'Booked', 'CR', 'CW', 'CA'), 'TRUE'),

if(match("OS",'Unqual','Qual,'Pro','Neg'),'FALSE'))

 

=if(match("CPS", 'Quot'),
if(match("OS",'OW','Booked','CR','CW', 'CA'), 'FALSE'),
if(match("OS",'Unqual','Qual,'Pro','Neg'),'TRUE'))

 


=if(match("CPS", 'Orph','Inac'),'Inval')

 

Labels (1)
5 Replies
marcus_sommer

You may just replace your TRUE/FALSE string-results with 1/0 and then adding and/or multiplying the parts - and maybe wrapping the result with a pick() to assign any strings to it.

But I wouldn't do it else doing this kind of categorizing already within the data-model and then using native dimensions.

SingSing16
Contributor III
Contributor III
Author

hello, I am not much familiar with pick function, I never used it in past.

Can you guide me a bit more?

I started:

Pick(match,(CPS, ('BCL,'PTB , 'Ship', 'Instal', 'Acc', 'Clin', 'Quot', 'Orph','Inac')

+1,’FALSE’, if(match("OS", 'OW', 'Booked', 'CR', 'CW', 'CA')….

 

Is it correct start?

 

Best Regards.

marcus_sommer

It depends on what you want to achieve. In your above example match() is only used to return TRUE or FALSE but TRUE could have multiple values and returning the first number of a match. Now you want to combine multiple checks - and here it depends on your target if you could add and/or multiply the results directly and/or with additional offset-values to return an unique return-value which may be able to be applied directly within a pick() or another match() nesting may be more suitable.

It's not so complicated like it may look like. Just create a dummy-app and a few inline-tables with just a few of your check fields and field-values and then developing the business-logic step by step. 

SingSing16
Contributor III
Contributor III
Author

Unfortunately I have trouble with this still. I am open to another answers/proposals.

barnabyd
Partner - Creator III
Partner - Creator III

G'day @SingSing16, can you give some example inputs and the output you expect to get from them?

Barnaby Dunn
BI Consultant