Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
dandaanilreddy
Partner - Creator III
Partner - Creator III

year and quarter

!Hwllo Qlik Developers

I have a pivot table in which i have 3 dimensions year, quarter and Date.

I want to display data from 2015 last quarter to 2017 2nd quarter. For the date dimension i wrote the calculated dimension as

=if(MonthName(UnitActuals.ReportedDate) >= addmonths(today(),-13)

and MonthName(UnitActuals.ReportedDate) <= addmonths(today(),+6), MonthName(UnitActuals.ReportedDate))

i tried the same way for year and quarter but its not working. Can someone help me please.

Thanks

Anil

13 Replies
MK9885
Master II
Master II

Thanks.

Where do you want to implement this expression and what output you expecting?

Any figures you've from db?

dandaanilreddy
Partner - Creator III
Partner - Creator III
Author

In the front end i have a chart in which i am displaying the quarters data for current year. My requirement is i want to show data from 2015 4th quarter to 2017 second quarter.

Thanks

Anil

MK9885
Master II
Master II

This can be your expression (I might be wrong)

=Count({<ProductGroup,UnitActuals.FutureQ1trFlag={1},UnitActuals.FutureQ2trFlag={1},UnitActuals.PYQtrFlag={1}>+<

UnitActuals.ReportedYear={2016}, UnitActuals.ReportedQuarter >}BillingRegionType )

OR

=Count({<ProductGroup,UnitActuals.FutureQ1trFlag={1},UnitActuals.FutureQ2trFlag={1},UnitActuals.PYQtrFlag={1}>}BillingRegionType )+

Count({<UnitActuals.ReportedYear={2016}, UnitActuals.ReportedQuarter >}BillingRegionType )

I'm not sure if you want to use SUM or COUNT. Depends on your requirement again. With SUM it's giving 0 and with COUNT it's giving 6K...

I do not know what dimensions to consider but I've checked the Flags are working fine and giving you required quarters from 2017 and 2015 only.

stalwar1

jontydkpi

maxgro

awhitfield

Maybe someone with expertise level can help you in this?

MK9885
Master II
Master II

Here is what I could do.

Not sure if that is the output you looking for....