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: 
james_wynn
Contributor
Contributor

set analysis newbie

I have my Master_Dates table in the datamodel with no synthetic joins; it is unaffiliated. I want to sum(ST_Amt) using set analysis and will place a Listbox in the dashboard with the field Fiscal_Week_Year to be used making the selection:

The code below returns null or zero$s, Itm_Dt is in the main detail table and Week_End is in the Master_Dates table. I am using algebraic expression < = which is probably incorrect. Can you help with a suggestion?

sum({$< Itm_Dt < = Week_End> ST_Amt})

1 Solution

Accepted Solutions
hector
Specialist
Specialist

Hi

my version is

sum({$< Itm_Dt = {"<=$(=Max(Week_End))"}>} ST_Amt)


So, if you don't have selections in the week_end field, at least it will return the max value in it.

Rgds

View solution in original post

5 Replies
Not applicable

Hi,

Try the following,

Sum({$<Itm_Dt={<=Week_End}>}ST_Amt)

This may not work depending on the values in the referenced fields, but give it a try.

Thanks

Nick

brenner_martina
Partner - Specialist II
Partner - Specialist II

Hi,

that's nearly good, but not enough

Sum({$<Itm_Dt={"$(<=Week_End)"}>} ST_Amt)

hector
Specialist
Specialist

Hi

my version is

sum({$< Itm_Dt = {"<=$(=Max(Week_End))"}>} ST_Amt)


So, if you don't have selections in the week_end field, at least it will return the max value in it.

Rgds

james_wynn
Contributor
Contributor
Author

Martina,

Your code above returns all zeros.

I also have:

Balance:
Sum({<Itm_Dt<={'$(Week_End)'}>} ST_Amt )

Balance Resolved
Sum({<Date_Resolved<={$(=Week_End)}>} ST_Amt )

Both return all rows summed; ie, no selection is being made... the fiiedls are all populated the issue is in the set analysyis. Can you help?

Thanks for your prompt post!

🙂
Jim

johnw
Champion III
Champion III

Héctor's code looks right to me. Did you try it? Did it return nothing as well?