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

Announcements
April 13–15 - Dare to Unleash a New Professional You at Qlik Connect 2026: Register Now!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Calculated Dimension

Hi everyone,

I am stuck, and hoping that someone can point me to a right direction here.

I would like to create a dimension which compares 2 columns (M1 vs M2) whose members are GT and LE. If M1 is greater than M2, then sum(M3) on GT, else sum(M4) on LE.

My problem is that my underlying dataset contains YearMonth, but the desired dimension and calculation depend on (entired) current selection, and creating a calcuated dimension in the load script will not get what I need.

Any help or suggestion will be much appreciated. Thank you.

DATASET:

(see attached)

Desired Result:

Dim_01M1 vs M2Sum
AAGT (M1 >M2)sum(M3)
AALE (M1<=M2)sum(M4)
BBGT (M1 >M2)sum(M3)
BBLE (M1<=M2)sum(M4)
CCGT (M1 >M2)sum(M3)
CCLE (M1<=M2)sum(M4)
DDGT (M1 >M2)sum(M3)
DDLE (M1<=M2)sum(M4)
EEGT (M1 >M2)sum(M3)
EELE (M1<=M2)sum(M4)
12 Replies
Not applicable
Author

Hi Kaushik,

I could be missing something here, but defining M1 vs M2 as dimension is what I am having trouble with.

Not applicable
Author

Hi Kush,

thank you for your qvw file. It still does not provide what I am looking for though. It seems you create M1 vs M2 dimension in the load script by summing up values by Dim_01 and ID.

But when I select YYYYMM=201303 in the report, you will see that sum(M1) = 93 < 117 = sum(M2) on Dim_01=AA, however, your M1 vs M2 dimension is still M1 > M2.

Kushal_Chawda

see the attached one