Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi
I have only just started using Qliksense and need some help.
This is my current expression;
=if(Year >= 2015 and Year < 2022,Year,NULL())
There is no data before 2016 hence why i hardcoded the 2015, but i dont want to hardcode the max year(and have to go in each year and update the max year) but i am unsure how to write the expression.
If i dont specify a year it brings across data year types. Any help would be greatly appreciated
Thanks
Hi @afa24 .
Year(Today()) can be used for current or max year.
Cheers!
Hi @afa24 .
Year(Today()) can be used for current or max year.
Cheers!
Hi,
I would add that since you have no data before 2016 you won't need to add the ">=" part of the condition and instead of using an "If" condition in your dimension, use set analysis in your measure. This will result in the max year being taken from the max year in your data.
For example:
count({$<year={"<$(=max(year))"}>}Column)
Thanks
Anthony
Thanks for that - i changed the bit of code to the following
=if(Year >= 2015 and Year <= year(today()),Year,NULL())
and it worked!
Thanks for the help
Hi Anthony - ill need to do some further investigation on the set analysis in the measure - . Thank you for the reply and ill see what i can find with the set analysis