Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
nikhilgarg
Specialist II
Specialist II

How to hide measure column based on no of dimensions visible?

Hello,

I have an application where i have 2 measures as :

SalesDI1  and SalesDI2.

If all my dimensions are expanded, i want SalesDI1 to be visible and SalesDI2 to be invisible.

If only my R1 and D1 dimensions are there and all other dimensions collapsed then i want SalesDI2 to be visible and SalesDI1 to be invisible.

I tried acheiving that with dimensionality() but couldn't do that. Can anyone help em on this?

Thanks

10 Replies
vardhancse
Specialist III
Specialist III

Hi I don't think so based on dimensions expansion visibility will work out.

Based on selections may be visibility might work.

tresesco
MVP
MVP

Dimensionality won't work here since it will always return zero outside the chart rows, and expression calculation conditional expression evaluates outside the chart rows. This might be possible with macro (not sure though), but that is not recommended. Read: Macros are Bad

qlikviewwizard
Master II
Master II

Did you check if conditional dimensions will work?

nikhilgarg
Specialist II
Specialist II
Author

Hey,

How wld conditional dimensions work ?

jonathandienst
Partner - Champion III
Partner - Champion III

I think you will need to use a variable to control the dimension and expression visibility. You will probably also need a button to toggle the variable between the 2 states.

All dimensions (except R1 and D1) are conditional on the variable = 1

Expression 1 is conditional on the variable =1 and expression 2 on the variable = 0

The button action expression:  =If(vToggle = 0, 1, 0)

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
vardhancse
Specialist III
Specialist III

Conditional Dimension will work something like;

SubStringCount('|'&Concat([% Fieldname],'|')&'|','|data|')

but conditional can work based on selection, but not on dimensions expansion

jagan
Luminary Alumni
Luminary Alumni

Hi,

Here Dimensionality won't work, also it is not suggestible to use the Macros, macros won't work in all the place.  Instead you can try adhoc reporting.  Check below link

Adhoc reporting in Qlikview


Regards,

Jagan.

nikhilgarg
Specialist II
Specialist II
Author

Hey,

Thanks but i don't understand your below statement:

"Dimensionality won't work here since it will always return zero outside the chart rows, and expression calculation conditional expression evaluates outside the chart rows." Can you plz explain?

nikhilgarg
Specialist II
Specialist II
Author

Hey,

Thanks but we dont want an added button. Any other alternative?

thanks