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: 
Nolgath
Creator
Creator

How to turn Measure into Dimension so I can use "Don't show nulls) option

Hello guys, i have this measure : 
if(min(manufactureYear) >= $(vMinYear) and min(manufactureYear)<= $(vMaxYear), min(manufactureYear), null())

I have the variables and when i choose, sometimes I get nulls, but since its a measure i cant remove nulls() I dont have the 'show nulls' option.

 

How can i create a dimention out of this? Preferebly in front end because I cant upload the data again because it takes 2 hours since its 25.000.000 lines.

 

Thanks guys

Labels (5)
1 Reply
hic
Former Employee
Former Employee

A dimension is always an array of values, and you can create this using Aggr().

In your case, you have to decide how often your expression should be calculated. For example, is it once per project, once per country, or once per Customer? If so, try one of the following
=Aggr(if(min(manufactureYear) >= $(vMinYear) and min(manufactureYear)<= $(vMaxYear), min(manufactureYear)), Project)
=Aggr(if(min(manufactureYear) >= $(vMinYear) and min(manufactureYear)<= $(vMaxYear), min(manufactureYear)), Country)
=Aggr(if(min(manufactureYear) >= $(vMinYear) and min(manufactureYear)<= $(vMaxYear), min(manufactureYear)), Customer)