Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
wanijkesv
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
sidhiq91
Specialist II
Specialist II

@wanijkesv  There is a minor issue with the set analysis Expression. Also, which Year are you looking at?

Something like below expression should help:

Sum({<Year={"$(=Year(Max(OrderDate)))"}>}LineSalesAmount)

Try to replicate the same expression using your Dimensions.