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: 
Qlikuser225
Contributor III
Contributor III

Help with Conditional hiding table or object in Qlik Sense

Hello All,

Can anyone please help me to with below

Year-Quater  Month  

2025-Q1        Jan

2025-Q1        Feb

2025-Q1        Mar

2025-Q2        Apr

2025-Q2        -

2025-Q2        -

 

I want to show a table only when all the months in selected Quarter is available in the data.

If User select 2025-Q1 then i can show table because (Jan,Feb,Mar is there in data), but if user select 2025-Q2 i want to hide table since only Apr is there but not May and Jun.

Thanks in Advance

Labels (4)
1 Solution

Accepted Solutions
stevedark
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi @Qlikuser225 

You can add a calculation condition to the table (or show condition if you are using containers) which does something like this:

=getpossiblecount(Month) = 3

It would be better if the month field was a Month/Year field, otherwise if someone selected three months from a filter then the table would show. Actually, that would still be true if someone selected three month/year values, so to bulletproof the above you could have:

=getpossiblecount(Month) = 3 and max(Month) - min(Month) <= 2

Or, if you had a month/year field it would be:

=getpossiblecount(MonthYear) = 3 and max(MonthYear) <= addmonths(min(MonthYear),2)

Hope that helps.

Steve

View solution in original post

2 Replies
ali_hijazi
Partner - Master II
Partner - Master II

there are two approaches for this:

first:
you can create the following calculated dimension:
=aggr(only({<[Year-Quater]={"=aggr(count(distinct Month),[Year-Quater]) = 3"}>}[Year-Quater]),[Year-Quater])

it shows the year-quarter where all months in the quarter got data i.e. 3 months per quarter
then you can use whatever expression you need to show:
the result is as follows:

ali_hijazi_0-1746618882648.png
finally you need to uncheck the include null values in the pivot table or anyother chart

ali_hijazi_0-1746619144774.png

Second
you can add the Year-Quarter as a normal dimension and in your expression you include the condition on the quarter whose all months got data:
=count({<[Year-Quater]={"=aggr(count(distinct Month),[Year-Quater]) = 3"}>}Month)

ali_hijazi_1-1746619475693.png

 

 

I can walk on water when it freezes
stevedark
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi @Qlikuser225 

You can add a calculation condition to the table (or show condition if you are using containers) which does something like this:

=getpossiblecount(Month) = 3

It would be better if the month field was a Month/Year field, otherwise if someone selected three months from a filter then the table would show. Actually, that would still be true if someone selected three month/year values, so to bulletproof the above you could have:

=getpossiblecount(Month) = 3 and max(Month) - min(Month) <= 2

Or, if you had a month/year field it would be:

=getpossiblecount(MonthYear) = 3 and max(MonthYear) <= addmonths(min(MonthYear),2)

Hope that helps.

Steve