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: 
krish2459
Creator
Creator

restrict filter in setanalysis

Hi,

We need to exclude "Business unit" in the below expression.

I have tried but no luck.

Please help me to reslove this.

=Min(Aggr(
Rangesum(Above(Sum( {<Year=, Quarter=, Month=, Week=, [Pstng Date]={">=$(=Date(Max( [Pstng Date])-13))<=$(=Date(Max( [Pstng Date])))"}>} [Posting Amount])
/Sum(total {<Year=, Quarter=, Month=, Week=, [Pstng Date]={">=$(=Date(Max( [Pstng Date])-13))<=$(=Date(Max( [Pstng Date])))"}>} [Posting Amount]),1,RowNo())),
(Material,(=Sum({1} {<Year=, Quarter=, Month=, Week=, [Pstng Date]={">=$(=Date(Max( [Pstng Date])-13))<=$(=Date(Max( [Pstng Date])))"}>} [Posting Amount]),Desc))
))

 

Thanks...

Labels (1)
1 Solution

Accepted Solutions
Kushal_Chawda

You need yo exclude it from each aggregation functions used here. If you want to exclude the selections for [Pstng Date] as well include there as well like Max( {<[Business Unit]>}[Pstng Date])

=Min({<[Business Unit]>}Aggr({<[Business Unit]>}
Rangesum(Above(Sum( {<Year, Quarter, Month, Week, [Business Unit],[Pstng Date]={">=$(=Date(Max( [Pstng Date])-13))<=$(=Date(Max( [Pstng Date])))"}>} [Posting Amount])
/Sum(total {<Year, Quarter, Month, Week, [Business Unit],[Pstng Date]={">=$(=Date(Max( [Pstng Date])-13))<=$(=Date(Max( [Pstng Date])))"}>} [Posting Amount]),1,RowNo())),
(Material,(=Sum({1} {<Year, Quarter, Month, Week,[Business Unit], [Pstng Date]={">=$(=Date(Max( [Pstng Date])-13))<=$(=Date(Max( [Pstng Date])))"}>} [Posting Amount]),Desc))
))

View solution in original post

3 Replies
krish2459
Creator
Creator
Author

Any suggestions please.

 

Thanks..

Kushal_Chawda

You need yo exclude it from each aggregation functions used here. If you want to exclude the selections for [Pstng Date] as well include there as well like Max( {<[Business Unit]>}[Pstng Date])

=Min({<[Business Unit]>}Aggr({<[Business Unit]>}
Rangesum(Above(Sum( {<Year, Quarter, Month, Week, [Business Unit],[Pstng Date]={">=$(=Date(Max( [Pstng Date])-13))<=$(=Date(Max( [Pstng Date])))"}>} [Posting Amount])
/Sum(total {<Year, Quarter, Month, Week, [Business Unit],[Pstng Date]={">=$(=Date(Max( [Pstng Date])-13))<=$(=Date(Max( [Pstng Date])))"}>} [Posting Amount]),1,RowNo())),
(Material,(=Sum({1} {<Year, Quarter, Month, Week,[Business Unit], [Pstng Date]={">=$(=Date(Max( [Pstng Date])-13))<=$(=Date(Max( [Pstng Date])))"}>} [Posting Amount]),Desc))
))

krish2459
Creator
Creator
Author

Thanks for the reply.

I have used the below expressrion but i'm abe to select plant,material,storage location and material description filters.

 

=Min({<[Business Unit],[Material Description],Plant,Material,[Storage Location]>}Aggr({<[Business Unit],[Material Description],Plant,Material,[Storage Location]>}
Rangesum(Above(Sum( {<Year, Quarter, Month, Week, [Business Unit],[Material Description],Plant,Material,[Storage Location],[Pstng Date]={">=$(=Date(Max({<[Business Unit],[Material Description],Plant,Material,[Storage Location]>} [Pstng Date])-13))<=$(=Date(Max({<[Business Unit],[Material Description],Plant,Material,[Storage Location]>} [Pstng Date])))"}>} [Posting Amount])
/Sum(total {<Year, Quarter, Month, Week, [Business Unit],[Material Description],Plant,Material,[Storage Location],[Pstng Date]={">=$(=Date(Max( {<[Business Unit],[Material Description],Plant,Material,[Storage Location]>}[Pstng Date])-13))<=$(=Date(Max( {<[Business Unit],[Material Description],Plant,Material,[Storage Location]>}[Pstng Date])))"}>} [Posting Amount]),1,RowNo())),
(Material,(=Sum({1} {<Year, Quarter, Month, Week,[Business Unit],[Material Description],Plant,Material,[Storage Location], [Pstng Date]={">=$(=Date(Max({<[Business Unit],[Material Description],Plant,Material,[Storage Location]>} [Pstng Date])-13))<=$(=Date(Max({<[Business Unit],[Material Description],Plant,Material,[Storage Location]>} [Pstng Date])))"}>} [Posting Amount]),Desc))
))

 

 

 

Thanks..