Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
jduenyas
Specialist
Specialist

Question re Calculated DIMENSION

Hi All

I have a table like the following:

CustomerCustomer CreateDateOrder CreateDateOrder Amount
A1/1/111/1/12                       125.00
B1/1/121/15/12                       352.00
A1/1/112/1/12                         35.00
C2/1/122/15/12                       486.00
A1/1/112/15/12                       651.00
B1/1/123/1/12                       268.00
D2/1/123/1/12                       566.00
E2/1/123/15/12                       321.00
D2/1/123/15/12                       951.00
F3/15/123/15/12                       423.00

I wish to show total of orders by selecting Order Date but only of the customers whose create date is equal or greater then the minimum order date.

So if selecting order date as greater than or equal Feb (2/1/12), Customer A and B will not show because they were create prior to the date selected. Likewise if selecting order dates greater than or equal Mar (3/1/12)  only Customer F will show.

I want the Customer to be in the DIMENSION list and the total calcultaed in the Expression.

In other words, I wish to show in my table only the NEW Customers who palced an order in the selected range of the order dates.

I tried to set the dimension to be:

If([Customer CreateDate] >= [Order CreateDate],Customer) but that did not work.

Any ideas?

Thanks

Josh

2 Replies
pover
Luminary Alumni
Luminary Alumni

Josh,

Try creating a variable called vMinOrderDate that is

=min([Order CreateDate])

Then create a calculated dimension that is

=if([Customer CreateDate] >= vMinOrderDate, Customer)

Then enable the suppress null values option for that field.

Karl

jduenyas
Specialist
Specialist
Author

You are a genius Karl.

Thanks. It worked.