Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Calculated Dimension correlated with expressions

Hi All

I have this pivot table where I'm segmenting customer based on 12 month revenue into A, B or C segment.

=if( Aggr( Sum({$<YEAR =, MONTH =>}NET), C_Number ) >= 60000, 'A',
if( Aggr( Sum({$<YEAR =, MONTH =>}NET),  C_Number) >= 25000, 'B',
if( Aggr( Sum({$<YEAR =>}NET),  C_Number
) >= 0, 'C')))


I select the latest 12 month, and uses the below expression to count the # of customers in the first period.


Count(DISTINCT {$< DATE={'>=$(=MonthStart(Today(),-12))<$(=MonthStart(Today()))'}>}, C_Number))


This works perfectly.


However, I want to add expression which count # customers for the 12 month before the latest 12 months. Then i uses below expression:


Count(DISTINCT {$< DATE={'>=$(=MonthStart(Today(),-24))<$(=MonthStart(Today(),-12))'}>}, C_Number))


Which works perfectly as well. BUT the segmentation of the customers in the period from 12 month till 24 months, is based upon the revenue from the first periode, 0 months til 12 months.


Is there anyway to achieve a separately segmentation of the 2 periods in the same table?


Thanks


Regards

Stefan




10 Replies
Anonymous
Not applicable
Author

Thanks again