Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Krish
Contributor III
Contributor III

Dimension as a measure

Hi,

 I am creating a pivot table where I have a measure which gives a count of ID. I need to to make it a dimension and collapse it so that it shows the count and upon clicking the expand option, I have to see new set of dimensions which will give the data for the count.

Something like this

Dim1 count      
ABC 200 ID Name Country
    1 aa A
    2 ab B
    3 bc N
Labels (1)
5 Replies
mpc
Partner - Creator III
Partner - Creator III

Hi,

You can use the Aggr function to use an expression as a dimension.
For instance: =Aggr(Count(ID),Dim1)

Kind regards

Krish
Contributor III
Contributor III
Author

Thanks for the response @mpc , but I tried using aggr(count(ID),Dim1) it shows blank for the ID,Name and Country fields. It works only when a value is selected for ID.

Also, my example has Valuelist as dimension (DIM1 is a valuelist)

mpc
Partner - Creator III
Partner - Creator III

Ok, then aggr(count(ID),Dim1,ID,Name,Country), caveat, it could greatly impact performances

Krish
Contributor III
Contributor III
Author

@mpc ,

Please find the attached sample. My requirement is to see the 5 ID's displayed for Feb-2024 and 3 for Jan-2024. The ID values as rows. 

delmak2000
Creator
Creator

Just add the column ID to the dimension and you should be fine. Except if you mean to achieve something else. I also recreated the output using your app sample. I hope it helps