Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
denisb
Contributor III
Contributor III

Chart expression with field from another table

Hi, 

I have some tables like the blue tables in this picture and I want a table chart like the yellow one. 

Stores is my dimension table and Orders is my fact table. 

To get the total Amount for each store is easy. Just take sum(Amount). 

But I also want to know the sum(Amount) before pp_date and after pp_date for each store. So need, somehow, to pick the right pp_date into my expressions. 

This does not work -> Sum({$<Datum={"<pp_date"}>}Amount) 

denisb_0-1605109386411.png

 

You know what I mean? 🙂 Maybe someone has an idea. 

Thanks 

 

Labels (1)
1 Solution

Accepted Solutions
chrismarlow
Specialist II
Specialist II

Hi,

I think you can just use IF statement to do this, like;

20201111_1.png

Cheers,

Chris.

View solution in original post

2 Replies
chrismarlow
Specialist II
Specialist II

Hi,

I think you can just use IF statement to do this, like;

20201111_1.png

Cheers,

Chris.

denisb
Contributor III
Contributor III
Author

Thanks.

Yes, of course this works. I tried it before, but it didn´t work. Know I found a mistake in my datamodel/dataset. 

I had some stores with the same data (in my stores table) four times. So my expression made the correct SUM of amount, but four times. 

Crazy 😄