Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
LucyN
Partner - Contributor II
Partner - Contributor II

Calculate data with date condition

Hi,

I have a table with these columns (field names)

As OfEntityPortfolioFlow CcyRef CcyCategoryMarketPeriodQuarterAs OfEntityPortfolioFlow CcyRef CcyCategoryMarketPeriodQuarterFcst Amount in Disp

 

When a select a specific Quarter (say 2019-Q4), the Period will be filtered out to 2019-10, 2019-11 and 2019-12. I want to calculate Sum of Fcst Amount for each As Of date when the As Of dates are equal or before the FIRST period of the selected Quarter (in this example, it's 2019-10).

I've attached my sample data below.

3 Replies
JustinDallas
Specialist III
Specialist III

Do you have any dummy data that we can work with?  A simplie Inline statement and a drawing of what you expect given the dummy data should suffice.

LucyN
Partner - Contributor II
Partner - Contributor II
Author

Here is the data

LucyN
Partner - Contributor II
Partner - Contributor II
Author

Here is the dummy data

As OfCategoryPeriodQuarterFcst Amount
2019-09CREVE2019-102019-Q41500
2019-10CREVE2019-112019-Q42000
2019-11CREVE2019-122019-Q4800
2019-09REV2019-102019-Q41000
2019-10REV2019-112019-Q42500
2019-11REV2019-122019-Q43000
2019-09CREVE2019-072019-Q3700
2019-10CREVE2019-082019-Q3800
2019-11CREVE2019-092019-Q3500
2019-09REV2019-072019-Q3500
2019-10REV2019-082019-Q3400
2019-11REV2019-092019-Q3600

 

Expectations:

If select 2019-Q4 in my Quarter filter, I would like to find Sum of Forecast Amount of each As Of date which is right on and before the first PERIOD of  the selected Quarter.

For example, If I filter by 2019-Q4, the first Period of this Quarter is 2019-10, I want a bar chart which:

- Dimension = As Of (As Of dates <= Period 2019-10)

- Measure = sum of forecast