Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
JeroenHoltrop
Contributor III
Contributor III

Use Record data in set expression

Hi all,

I hope you can help me, as i tried finding the way to do this, but I am not getting there.

This gives me the result I want:

only ({$<PropositionComponentKey={'12'}, PricePropositionStartDateKey={"<=20210101"}, PricePropositionEndDateKey = {">=20210201"} >}Price)


The dates should be updated by record data, so the dates are coming from the record in Qliksense. I cannot seem to get the correct command for it. This seems logical to me, but Qlik thinks differently 🤔

only({$<PropositionComponentKey={'12'}, PricePropositionStartDateKey={"<={$(=InvoiceLineStartDateKey)}"}, PricePropositionEndDateKey = {">=20210201"} >}Price)

The invoicelineStartDateKey is exactly the data that is in the first query, however the result in my Qliksense screen is a null value.  I have tried multiple ways to have the daya in my query, but the result currently is always the same. 

Is there anyone who knows what I do wrong?

1 Solution

Accepted Solutions
hic
Former Employee
Former Employee

You have one pair of curly brackets too many.

... ={"<={$(=InvoiceLineStartDateKey)}"}, ...

should be

... ={"<=$(=InvoiceLineStartDateKey)"}, ...

View solution in original post

3 Replies
hic
Former Employee
Former Employee

You have one pair of curly brackets too many.

... ={"<={$(=InvoiceLineStartDateKey)}"}, ...

should be

... ={"<=$(=InvoiceLineStartDateKey)"}, ...

rubenmarin

Hi, you can a field list to check the available values for InvoiceLineStartDateKey, if there is more than one possible value the expression will fail.

Note that set analysis is not evaluated row by row, it is calculated before the table to select the dataset, and after that the chart is calculated using this dataset.

Also this can be a format issue, is the value for InvoiceLineStartDateKey in YYYYMMDD format?

If you open expression editor you can check a the bottom how $(=InvoiceLineStartDateKey) is converted to see the expanded expression that will be used.

JeroenHoltrop
Contributor III
Contributor III
Author

Yeah, that is it, now it works, thank you very much @hic !