Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
bruno9831
Contributor
Contributor

How to create a calculated dimension and use the values for filters

Hi, everyone.

Could you help me?

I created this calculated dimension, but I can't insert it into a table or use the dimension's values in a filter to filter my table.
When I insert the dimension into a filter, the value "Invalid Dimension" is returned after adding it.

 

e359b878-802b-478a-a9d8-198c15710b03.jpg

 

How could I solve it?

Labels (5)
1 Reply
pedrohenriqueperna
Creator III
Creator III

Olá,

 

Consegue compartilhar uma amostra?

 

Dá uma olhada em ValueList(). Basicamente você define a dimensão na tabela ou gráfico como:

ValueList('A', 'B', 'C')

 

Na medida você conseguiria calcular os valores da dimensao separadamente como:

If(ValueList('A', 'B', 'C') = 'A', Sum(x))

 

therealdees_0-1732304132210.png

 

PS: Se houverem muitos valores no campo da dimensao/valuelist, vc poderia adicionar em uma variável e evitar repetir, algo como:

If(vDimensionList = 'A', x, If(vDimensionList = 'B', y)) ....