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

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
amien
Specialist
Specialist

simple set analysis question

SUM({1<Year = {$(=MAX(Year))}, Month = {"<=$(=MAX({<Year ={$(=MAX(Year))}>} Month)"}>} Costs)

This gives me a nice YTD value, based on the maximum year and month selected (if any selected)

but now my customer list doesn't react anymore .. what do i need to change/add?

1 Solution

Accepted Solutions
swuehl
MVP
MVP

Try either using a set identifier $ instead of 1 if you want to use the current selection set as base:

SUM({$<Year = {$(=MAX(Year))}, Month = {"<=$(=MAX({<Year ={$(=MAX(Year))}>} Month)"}>} Costs)

or

SUM({1<Year = {$(=MAX(Year))}, Month = {"<=$(=MAX({<Year ={$(=MAX(Year))}>} Month)"}, Customer = p() >} Costs)

to regard the current possible Customer values in your set.

Hope this helps,

Stefan



View solution in original post

3 Replies
swuehl
MVP
MVP

Try either using a set identifier $ instead of 1 if you want to use the current selection set as base:

SUM({$<Year = {$(=MAX(Year))}, Month = {"<=$(=MAX({<Year ={$(=MAX(Year))}>} Month)"}>} Costs)

or

SUM({1<Year = {$(=MAX(Year))}, Month = {"<=$(=MAX({<Year ={$(=MAX(Year))}>} Month)"}, Customer = p() >} Costs)

to regard the current possible Customer values in your set.

Hope this helps,

Stefan



amien
Specialist
Specialist
Author

hmm .. $ is ok .. BUT Month is this format : 1,2,3,4

But the user selects a different dimension : MonthName : jan, feb, mrt etc

it works when i make a selection based on Month (1,2,3) .. but not on MonthName. But i cann't calculate with Monthname?

amien
Specialist
Specialist
Author

nevermind .. it's translated in the set analysis .. jan becomes 01

Thanks swuehl ..

where are you from btw? Remember me to buy to a drink if i ever meet you