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

Using Show Column If To Display Column if Quarter is Older than Today

I have a list of columns that I created using set analysis which sum a dollar amount by the quarter it was associated to.  My columns are Q1, Q2, Q3, and Q4.  I want to only show the columns if the quarter they represent is the current quarter or past quarter in the current year.  I thought the "Show Column If" would be perfect for this but I cannot figure out how to write the function to get this to work.  My fields are based off of the quarterstartdate if that helps. 

 

Labels (1)
1 Reply
Rohan
Partner - Specialist
Partner - Specialist

Hi @Kelliesy , 

Instead of going for hide & show, why don't you show only 2 columns for current & past Quarter using set analysis :

Current Quarter to Date : Sum({<Date={">=$(=quarterstart(max(Date))) <=$(=max(Date))"}>} Amount)

Previous Quarter to Date:  Sum({<Date={">=$(=quarterstart(max(Date),-1)) <=$(=addmonths(max(Date),-3))"}>} Amount)

If you want hide & show then use :  quarterstart(today()) < today()

I hope this will help your case.

Regards,

Rohan.