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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Calculate dimension

hi,

I have a data set like below.

 

CustomerCost1Cost2Revenue
A1030100
B2010200
C3020300

I want to create a calculated dimension for customers based on cost1 and cost2,

i want only those customer in my calculated dimension, when sum(cost1)+sum(Cost2)>=50.

thanks

Prasanta

1 Solution

Accepted Solutions
sunny_talwar

Alternative solution is to use a set analysis like this:

=Sum({<Customer = {"=Sum(Cost1) + Sum(Cost2) >= 50"}>}Revenue)

With Customer as the dimension

Capture.PNG

View solution in original post

2 Replies
sunny_talwar

You can try this as your dimension:

=If(Aggr(Sum(Cost1) + Sum(Cost2) >= 50, Customer), Customer)


Capture.PNG

sunny_talwar

Alternative solution is to use a set analysis like this:

=Sum({<Customer = {"=Sum(Cost1) + Sum(Cost2) >= 50"}>}Revenue)

With Customer as the dimension

Capture.PNG