Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
dinghankar
Contributor
Contributor

Need help with set expression

I am new to qliksense and I'm trying out a scenario as part of my learning. I have two tables Sales(contains Sales_Date) and Target(contains Target_Year and Target_Value). Sales table has values for every day and Target has year level data. I'm trying to create a table visual with both data combined. So the table visual will have the following columns: Sales_Date Target_Value

Since the Target table has year level data, I'm trying to bring Target_Value into the table visual using the below set expression in a measure =Sum({<Target_Year = {$(=Year(Date(Sales_Date)))}>}Target_Value)

This doesn't seem to work and I get no value. The expression editor doesn't throw any error. The next option would be to create a Sales_Year column in the Sales table and associate it with the Target_Year in Target table to get the corresponding Target_Value. But I would like to understand why the above expression doesn't work. Do set expression not work in row level? Any guidance is greatly appreciated.

Thank you.

Labels (1)
  • Other

1 Reply
BrunPierre
Master
Master

Hi, " " in modifiers are used for evaluated values.

=Sum({<Target_Year = {"$(=Year(Date(Sales_Date)))"}>}Target_Value)