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

Get

I'm trying to use the enddate of a period decided by Year and Month selections on two listboxes (standard representation of master calendar) , and using this value to find the sales on this last date, using set analysis.

So the flow of execution is planned to be like the following:

  1. The user select a period

  2. This triggers qlik to calculate the variable vL.MaxSelectedDate (date (max( AppDate ) )

  3. Then this variable should be sent back to calculate the sales on this particular date, by using set analysis. Se the formula below:

    sum (
       {$<
            
    AppDate = { $(=vL.MaxSelectedDate) }
       > }
      
    Sales 
    )

See the attached application for all details.

Any suggestions on how this can be solved, or if it is at all possible to solve.

1 Solution

Accepted Solutions
rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

1. Add an "=" to your variable def of vL.MaxSelectedDate. ie

=date (max(  AppDate ))

2. Add single quotes to your set expression.

=

sum (

   {$<

    AppDate = { '$(=vL.MaxSelectedDate)' }

   > }

   Sales 

)

-Rob

http://masterssummit.com

http://robwunderlich.com

View solution in original post

4 Replies
rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

1. Add an "=" to your variable def of vL.MaxSelectedDate. ie

=date (max(  AppDate ))

2. Add single quotes to your set expression.

=

sum (

   {$<

    AppDate = { '$(=vL.MaxSelectedDate)' }

   > }

   Sales 

)

-Rob

http://masterssummit.com

http://robwunderlich.com

MarcoWedel

you don't have to use variables in this case:

=Sum({$<AppDate={'$(=max(AppDate))'}>} Sales)

could work as well.

QlikCommunity_Thread_147643_Pic1.JPG

hope this helps

regards

Marco

Not applicable
Author

Thanks Marco,

I could not get this work right away so I put it away since I want to use variables and Rob's suggestion works.

Your suggestion took away the errormessage, so I could probably get it working if I started looking into it but since I have a working solution I will not pursue that right now.

MarcoWedel

OK.

Thanks for your reply

Regards

Marco