Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Hide YEAR when any quarter is null

Hi All,

I have one dimension and three expressions

Dimesnion - if(DATE>='12/31/1980',YEAR)

Expression1 - avg({<NAME={'A'}>VALUE))/100

Expression2 - avg({<NAME={'B'}>VALUE))/100

Expression3 - avg({<NAME={'C'}>VALUE))/100

Now i want to hide YEAR in my chart for any quarter Q1,Q2,Q3,Q4 is null for those NAMES in the expression, then whole YEAR Should not be shown in my Chart.

Please let me know if there are  any concerns

Thanks

Avinash

jagan

23 Replies
deepakqlikview_123
Specialist
Specialist

check out the expressions for countries you will get it

Not applicable
Author

Hi,

Many thanks for your reply.

I am not getting correctly for the above solution. I have attached one file with inline table.

Please find the attachment

Thanks

Avinash   jagan

PradeepReddy
Specialist II
Specialist II

first read the date in correct format..

SET DateFormat='MM-DD-YYYY';

Now use this expression in calculated dimension...  and enable the 'Suppress When Value is Null'

if(DATE>'1-1-2011' and aggr(sum(if(len(ltrim(VALUE))=0,1)),YEAR)=0,YEAR)

sunny_talwar

Check if the attached is something you are looking for.

PradeepReddy
Specialist II
Specialist II

see the attached file...

Not applicable
Author

Many thanks Sunny for your reply.

It is not working. May be my file data is wrong which i have attached. Could you please consider the first message as my requirement and can you help me on that message.

thanks

Avinash

sunny_talwar

Just so I understand, the output in the attached application is what you want, but when you apply the sample logic to your original application it doesn't give you the right output? Is that what is going on?

PradeepReddy
Specialist II
Specialist II

Hi Avinash,

If I understand correctly, as the data(VALUE) for  Q2, Q3, Q4 quarters for 2013,2014 years is blank/NULL.

You have to omit those years from the dimensions. and you have to showcase only '2012'  data.

If this is the case see my attachment in earlier post.

Not applicable
Author

Yes Sunny i have applied  your logic and i tried with your logic in changing the code to different scenarios but not getting the output.

Please help me on this.

Thanks

Avinash

Not applicable
Author

I tried with your logic changing in the calculated dimension but not getting the output.

Please help me on this.

Thanks

Avinash