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: 
lucasdavis500
Creator III
Creator III

Creating Criteria for Variables without set analysis (no function)

How can I retrieve values based on something similar to set analysis for variables I have in my data?

Example:

I have text objects I use in my dashboard to show the user the most current data or data based on their selection.

Here's one of my text boxes:

='Furnishings for ' & Month(NOW() - 1 ) & ' ' & Year & ' ' & ':'

Returns: Furnishings for Oct 2016:

Below this I have another text object that is simply my variable

=Furnishings

I want "Furnishings" to resemble something similar to the first text box, and return the value for that month, if I could do =({<Month = {'Month(NOW() - 1)'}>}Furnishings)

Then the above would be something similar to how it could be done in Set Analysis, except I don't have an actual FUNCTION in order to use set analysis, just a variable.....

1 Solution

Accepted Solutions
sunny_talwar

Are you looking for this may be?

='Furnishings for ' & Month(NOW() - 1 ) & ' ' & Year & ' ' & ':' & Only({<Month = {"$(=Month(Today() - 1))"}>} Furnishings)

View solution in original post

5 Replies
Anil_Babu_Samineni

Do you mean this

='Furnishings for ' & Only({$<Month = {'$(=Month(NOW() - 1))'}>}Furnishings) & ' ' & Max(Year) & ' ' & ':'

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
sunny_talwar

Are you looking for this may be?

='Furnishings for ' & Month(NOW() - 1 ) & ' ' & Year & ' ' & ':' & Only({<Month = {"$(=Month(Today() - 1))"}>} Furnishings)

lucasdavis500
Creator III
Creator III
Author

I'm interested in this piece, =Only({<Month = {"$(=Month(Today() - 1))"}>} Furnishings), but, for some reason, qlikview doesn't like when I use double quotes ("). I've seen set analysis used with double quotes on this page before, and when i try to do the same for my set analysis, it treats the entire string within the quotes as a variable (it turns red)... is this normal?

lucasdavis500
Creator III
Creator III
Author

+1 for both of you, I believe Sunny's is more resource efficient because of the Today function vs NOW

lucasdavis500
Creator III
Creator III
Author

Correction, it worked, I just had a small syntax error but my set analysis still turns red like i'm trying to reference a variable