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

Announcements
Qlik GA: Multivariate Time Series in Qlik Predict: Get Details
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

How to Use a Measure Result As Dimension?

Hello Everyone!

I was wondering if I can use a measure result condition as a Dimension (i.e. assuming I have measure X which is the avg time, I'd like to have a dimension like the following: X < 20, X=20 , X>20)

Your help is really appreciated!

1 Solution

Accepted Solutions
Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

A measure is calculated over dimension values. If used without dimensions then a measure returns only one value.

So if you want to use a measure as a dimension you probably want to use the measure values calculated for each of the dimension values of a dimension. So you need to use the aggr function to build a virtual table with the list of measures per dimension value.

Something like this:

Aggr(

     If( avg(Time) < 20, 'X<20',

          If( avg(Time)=20,'X=20','X>20'))

     DimensionA, DimensionB, ...etc )


talk is cheap, supply exceeds demand

View solution in original post

2 Replies
Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

A measure is calculated over dimension values. If used without dimensions then a measure returns only one value.

So if you want to use a measure as a dimension you probably want to use the measure values calculated for each of the dimension values of a dimension. So you need to use the aggr function to build a virtual table with the list of measures per dimension value.

Something like this:

Aggr(

     If( avg(Time) < 20, 'X<20',

          If( avg(Time)=20,'X=20','X>20'))

     DimensionA, DimensionB, ...etc )


talk is cheap, supply exceeds demand
Amit_Kakkad_PD
Contributor II
Contributor II

Amazing! This has fixed my issue!