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

How to calculate Q1 2021 and previous year 2020 Q1

Spoiler
Spoiler
 

Hi guys ,

I want to show Q1 2021 and Q1 2020  count(request id) in KPI, How to write expression.

Please help me,

Thanks in advance.

Regards,

Subba Reddy

1 Reply
Vegar
MVP
MVP

Assuming you have date field, named [Date]. Try this.

Count({<[Date]={">=quarterstart('2021-01-01')<=quarterend('2021-01-01')"}>}RequestID)

 

This expression is assuming you have YYYY-MM-DD as default Date format, if  not then you should adjust to your format.

You can adjust the hard codes dates with an dollar expansion or variable.