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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Set Analysis with Variable

Hello,

I am trying to understand why this set doesn't work:

({$<[Program]={"Bid", "Dry", "Frz"}>} $(vBasePeriodPounds))

I have tried:

Sum({$<[Program]={"Bid", "Dry", "Frz"}>} $(vBasePeriodPounds))

and it doesn't work either.

I am new with using Variables and I think the $(vBasePeriodPounds) is the issue in making this set analysis work.

Thanks for the help!

-Tim

1 Solution

Accepted Solutions
harishkumarg
Creator III
Creator III

What is definition for variable "vBasePeriosPounds"?

Regards

Harish

View solution in original post

3 Replies
harishkumarg
Creator III
Creator III

What is definition for variable "vBasePeriosPounds"?

Regards

Harish

sunny_talwar

How do you define your variable vBasePeriodPounds?

Not applicable
Author

Sunny and Harish,

You are both correct. You both pointed me to the fact that my vBasePeriodPounds is already a set analysis and all I needed to do was add the Programs to get the values I was after.

To illustrate

vBasePeriodPounds = sum({$<[Fiscal Year]=[BasePeriod]::[Fiscal Year],[Fiscal Quarter Name]=[BasePeriod]::[Fiscal Quarter Name],[Fiscal Period Date]=[BasePeriod]::[Fiscal Period Date],[Fiscal Year Week]=[BasePeriod]::[Fiscal Year Week]} Sales Pounds])

I just added the Program after the [Fiscal Year Week] and closed the Analysis with }>}

Thank you!