Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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
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
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:
finally you need to uncheck the include null values in the pivot table or anyother chart
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)
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