Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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.....
Are you looking for this may be?
='Furnishings for ' & Month(NOW() - 1 ) & ' ' & Year & ' ' & ':' & Only({<Month = {"$(=Month(Today() - 1))"}>} Furnishings)
Do you mean this
='Furnishings for ' & Only({$<Month = {'$(=Month(NOW() - 1))'}>}Furnishings) & ' ' & Max(Year) & ' ' & ':'
Are you looking for this may be?
='Furnishings for ' & Month(NOW() - 1 ) & ' ' & Year & ' ' & ':' & Only({<Month = {"$(=Month(Today() - 1))"}>} Furnishings)
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?
+1 for both of you, I believe Sunny's is more resource efficient because of the Today function vs NOW
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