Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Halesha_Bandri
Contributor II
Contributor II

Facing issue in front end Aggregation

I am calculating percentage in my dashboard.

for calculating  percentage  Numerator and Denominator is there.

In the numerator part => counting document numbers from table1

In the denominator part => counting document numbers from table2 

I am facing issue in the denominator part ==> Two things I need to do here.

1. I need to  "count" the document numbers

2. then I need to calculate "rolling sum" for those "count". For this "rolling sum" I need to consider only "last 12 months " and if I select any month in the "master calendar" then it should consider  "last 12 months" according to the selections.

This denominator part should work across all the dimensions.

I have gone through aggregation function but I didn't get any solution out of it.

Please find the below formula for the denominator part.

Aggr(
Rangesum(
Above(
Count([document_number])
,0,12)
)
,MonthYear)

Labels (1)
2 Replies
Prem0212
Creator
Creator


I have taken a sample date field as Ship Date  and I hope this expression will work for u

RangeSum(Above(
Count({<Date={">=$(=Date(AddMonths(([Ship Date]),-12),'YYYY-MM-DD'))<=$(=[Ship Date])"}>} [Sales]),
0, RowNo()
))

Please like and accept the solution if u liked it.

 

 

 

Chanty4u
MVP
MVP

You can try this 

Aggr(

Rangesum(

Above(

Count({$<Date={">=$(=MonthStart(AddMonths(Max(Date),-11)))<=$(=Max(Date))"}>} [document_number])

,0,12)

)

,MonthYear)