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

Monthy Avg by Day

Hi All, I have an chart Forecast by Day. One KPI would be Monthly Avg Forecast by Day.

That is: sum(Forecast for each month)/Working day for each Month.

And the bar will be a straight line for one each Month.

I am attaching the App. Could you please help me  to figure out Month Level Forecast.

Thanks,

Sarif

1 Solution

Accepted Solutions
sunny_talwar

WorkingDays were not even there in your expression.... Try this

=Sum(Aggr(Sum(TOTAL <CstFiscalPeriod> SalesForecastUnitsSnapshot/WorkingDays),CstFiscalPeriod, CstDate))

Capture.PNG

View solution in original post

8 Replies
sunny_talwar

You need this in a text box object? May be try this

=Sum(SalesForecastUnitsSnapshot/WorkingDays)

mhmmd_srf
Creator II
Creator II
Author

No Sunny,

I need this in the chart.

In chart I have monthly level forecast in Green Line.

I need in this.

I am using below:

sum(aggr(sum(SalesForecastUnitsSnapshot),CstFiscalPeriod))/WorkingDays

But if I select one month it showing one dot. I need a straight line for one month.

Please help.

Thanks,

Sarif

sunny_talwar

May be this

=Sum(TOTAL Aggr(Sum(SalesForecastUnitsSnapshot),CstFiscalPeriod))

Capture.PNG

sunny_talwar

Or may be this

=Sum(Aggr(Sum(TOTAL <CstFiscalPeriod> SalesForecastUnitsSnapshot),CstFiscalPeriod, CstDate))

Capture.PNG

mhmmd_srf
Creator II
Creator II
Author

Yes.. I was trying use TOTAL, but could not use it Properly.

Thanks Sunny.

I am using :

=Sum(TOTAL Aggr(Sum(SalesForecastUnitsSnapshot),CstFiscalPeriod))/WorkingDays

Now,

for Month1: 388897

for Month2: 423599

For individual Month selection it is showing Correct. But If I select both Month 1 and 2, values are changing.

Might be Working days is not restricting for Month.

Could you please help on this.

Thanks,

Sarif

sunny_talwar

WorkingDays were not even there in your expression.... Try this

=Sum(Aggr(Sum(TOTAL <CstFiscalPeriod> SalesForecastUnitsSnapshot/WorkingDays),CstFiscalPeriod, CstDate))

Capture.PNG

mhmmd_srf
Creator II
Creator II
Author

WOW.... great.. I am just wondering why I am not able to do this by my own...

You are awesome.

Can you please help me to understand the function of <CstFiscalPeriod>  in your expression.


Thanks,

Sarif

sunny_talwar

It is used with TOTAL Qualifier which tells the expression the scope of the aggregation.

The Aggregation Scope