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: 
mario-sarkis
Creator II
Creator II

Set analysis Grouping dimension

Dear All,

I Have a List of Account that has a previous Bucket B0,B1,B2,B3,.... And current Bucket will Change or still the same

I need to calculate in a Pivot table a ratio of for example the number of account that have previous bucket B0 / The number of account that become B0_B1 (or Become B1)

Please find the following example Thanks:

   

Database
PreviousBucket Current BucketDimension Bucket FlagAccount
B0B1B0-B111
B0B1B0-B112
B0B0B0-B003
B0B0B0-B004
B1B1B1-B105
B1B0B1-B006
B1B2B1-B217
B1B2B1-B218
B1B2B1-B219
B2B1B2-B1010
B2B1B2-B1011
B2B3B2-B3112
B2B3B2-B3113
B2B3B2-B3114
OutPut Ration of distinct accounts by Dimenssion Buckets
Dimension Bucket RatioValues
B0-B1(Number of Account of B0_B1)/(Number of Account that has as Previous Bucket 0) 0.50
B1-B2(Number of Account of B1_B2)/(Number of Account that has as Previous Bucket 1) 0.6
B2-B3(Number of Account of B2_B3)/(Number of Account that has as Previous Bucket 2) 0.6
4 Replies
swuehl
MVP
MVP

Try two dimensions, PreviousBucket and CurrentBucket.

As expressions:

=Count(DISTINCT Account)

=Count(DISTINCT Account) / Count(TOTAL<PreviousBucket> DISTINCT Account)

mario-sarkis
Creator II
Creator II
Author

Hey Stefan

Thank you for you reply

But this Expression will count all Accounts of Previous Bucket??

I need to the Total Accounts of B0 incase The Dimension is B0_B1

and to The Total Accounts of B1 incase The Dimension is B1-B2 ,.....?

Thank you

pradosh_thakur
Master II
Master II

DIMENSION =      =IF(Flag=1,[Dimension Bucket],NULL())

MEASURE =      aggr(count([Dimension Bucket]),[Dimension Bucket]) / aggr(count( [Dimension Bucket]),PreviousBucket)

Attached is the QVW

regards

Pradosh

Learning never stops.
swuehl
MVP
MVP

Have you tried using the two dimensions and two expressions?