Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Calculated dimension: Nested IF returns a null value in addition to the other correct value

Hi,

I have the following calculated dimension:

=If(GetFieldSelections(Language_Id) = 'FR', REV_SubRubric_FR, (If(GetFieldSelections(Language_Id) = 'DE', REV_SubRubric_DE,(If(GetFieldSelections(Language_Id) = 'EN', REV_SubRubric)))))

here isthe tables relationship:

error loading image

I have only 6 rows on the FieldsMap1 table.

Can someone explain me why I got 7 values in my calculated dimension?here is the chart where you can see a null value:

error loading image

If, instead of a calculated dimension, I use the Field REV_SubRubric as my dimension, then I got only the 6 correct values.

Do you know what I am doing wrong?

thanks,

Caro.

4 Replies
Stefan_Walther
Employee
Employee

Sorry, I think without any sample data this question is really hard to answer 🙂

Not applicable
Author

Hi there, try this:

pick(match(Language_Id,'FR','DE','EN'), REV_SubRubric_FR, REV_SubRubric_DE, REV_SubRubric)

Regards

johnw
Champion III
Champion III

Oh, and in addition to simplifying with the pick(match()) that Ivan gave, checkmark "suppress when value is null" for your calculated dimension. That should make the null value go away.

Not applicable
Author

Thanks for the solution !! Works fin for me too

Gracias por la solcion !! A mi tambien me funciono