Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
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: 
Not applicable

set analysis with parameter

Hi Everyone,

I have a straight table that in some of the columns I need to do set analysis on it (this is only one example but I have on each column different calculations with conditions on it) :

I need to do sum on  [Posting Amount] where this conditions exists :

[Source Table Name]=BCPM

AND

[Creation Date] <= Creation Date from Search Criteria

"Creation Date from Search Criteria" meaning that that is the value that the user selected in the report from the [Creation Date]  values in the List Box .

I am trying to write a set analysis for it ,

so I made a parameter: $vCurrentDate ,  that takes the value that been selected by the user in the List box of CreationDate

then I wrote this in the expression of the chart properties:

=sum({$<[Source Table Name]=BCPM , (date([Creation Date],'MM/DD/YYYY'))<= {$vCurrentDate}>} [Posting Amount] )

it have a lot of errors.

please help me to find the right set analysis script.

thanks,

Moni

1 Solution

Accepted Solutions
sunny_talwar

Is  [Creation Date] a date field or text field? Can you share how it looks?

The reason for the error is the Date() function on the left side of the equation. You cannot use functions there (only field names). So you will have to make it date if it isn't one in the script.

View solution in original post

3 Replies
sunny_talwar

Is  [Creation Date] a date field or text field? Can you share how it looks?

The reason for the error is the Date() function on the left side of the equation. You cannot use functions there (only field names). So you will have to make it date if it isn't one in the script.

Not applicable
Author

[Creation Date] is  a field in the straight table.

sunny_talwar

It is not created in the script? I am not sure how you plan to use that in set analysis? Do you have an app you can share to show how your data looks?