Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Learn how to migrate to Qlik Cloud Analytics™: On-Demand Briefing!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

show zero values in bargraph

I need to show present quarter and  previous 3 quarters always even when if there is no data for quarters(just as axis)... I created master calender such that it can have all dates, months and quarters  and i can not clik to show all values in dimension tab because i have to show only 4 quarters.... by result,this is not showing me the quarters which do not have data..

can some one help me...

Please find attachment here...

Thanks

12 Replies
Anonymous
Not applicable
Author

oh !! I got you, so, is there a way to limit dimension which is not numeric.. which can limit to current selection and previous 3 ...??

tresesco
MVP
MVP

I guess you should try otherwise, use the limiting time set analysis part in the expression(NOT calculated dimension) itself and let the dimension remain simple field value. Based on your expression limit dimension would get reduced. And yes, you can limit the string quarters based on your numeric date field.

Ex:

=Aggr(only({<Date_CP ={'>=$(=num(Addmonths(Max(Date_CP),-9)))' }>}[YearQuarter_CP]),[YearQuarter_CP])

I would suggest not to use calculated dimension here. Instead use SET part something like :

{<Date_CP ={'>=$(=num(Addmonths(Max(Date_CP),-9)))' }>} in your main expression.

Anonymous
Not applicable
Author

Ya, we can do it by date, I used YearQuarter  in dimension as it is,  Date in  expression to limit Quarters,but it is showing no change as before; see below

Count(Distinct {[State_PP]< Year_CP = , Month_CP = , Quarter_CP =  ,Date_CP ={'>=$(=num(Addmonths(Max(Date_CP),-12)))'},

MonthN_CP = {'$(=$(vGetMonthYear(vSelectedDate)))',

'$(=$(vGetMonthYear(Date(QuarterStart(vSelectedDate) -  1))))',

'$(=$(vGetMonthYear((QuarterStart((QuarterStart(vSelectedDate)-1))-1))))',

'$(=$(vGetMonthYear((QuarterStart((QuarterStart((QuarterStart(vSelectedDate) -  1)) - 1)) - 1))))'

}>}
[Patient ID])

Correct me if I am wrong..