Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
ramanarayan
Creator
Creator

How to restrict dimension values in chart using if condition

H Experts,

In the attached qvw, i need to show the latest 4 weeks in my dimension. Please advise.

I need to able to see only the following weeks in my chart

201821

201820

201819

201818

Thanks,

Ram

4 Replies
PrashantSangle

In expression try below,

=sum({<Week_Year={'201821','201820','201819','201818'}>}Amount)

dimension : Week_Year.

Note : avoid calculated dimension it is performance killer.

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
tamilarasu
Champion
Champion

Hi,

Have a look at the attached file. I would suggest you to use set expression as calculated dimension is not necessary in this case and it will impact the performance when you have large data.

sudhirpkuwar
Partner - Creator II
Partner - Creator II

In Dimension limit tab select

1.PNG

PrashantSangle

If you still want it in calculated dimension then try

if(match(Week_Year,'201821','201820','201819','201818'),Week_Year)

and select suppress when value is null

Regards,

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂