
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Trying to create a filter for 2 variables
Hello,
I created 2 variables using set analysis for Actual Revenue and Adjusted Revenue (i.e vRevenueActual & vRevenueAdj). I want to be able to filter or toggle between the 2, and I'm not sure how to write/build that into a filter.
Any thoughts are most appreciated. Thank you, Scott
PS: To add to the question, I am using the variables within a measure, so I can change the measure between the 2.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
You can create a filter in Qlik Sense using a list box with your two variables vRevenueActual and vRevenueAdj. Here's how you can do it:
1. Create a new inline table with the names of your two variables. You can do this in the data load editor:
LOAD * INLINE [
RevenueType
vRevenueActual
vRevenueAdj
];
2. Add a list box to your sheet and use RevenueType as the dimension.
3. In your measure, use a conditional statement to switch between the two variables based on the selected value in the list box. Here's an example:
if(RevenueType = 'vRevenueActual', $(vRevenueActual), $(vRevenueAdj))
This will change the measure based on the selected value in the RevenueType list box.
Remember to replace vRevenueActual and vRevenueAdj with the actual expressions you're using for these variables.
I hope this helps! Let me know if you have any other questions.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello Sayed,
Sorry for the delayed response. I was able to figure out the best way to create this variable, and it works just fine. I just wanted to send a quick note to thank you for your response :).
Take good care,
Scott
