Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Posting on Qlik Community is temporarily paused for some users. Thank you for patience and we'll update you soon!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Ignore selection in an Aggr function

Hi,

can someone assist me , i have the following expression i want it to ignore the year and month selection:

Where should i put the year and month dimension , ive been trying for long .

SUM((aggr(sum([Quantity On Hand])*sum([Unit Cost]),WareHouse,InventoryStockCode)))

Labels (1)
6 Replies
kaushiknsolanki
MVP
MVP

Hi,

Try this

SUM((aggr(sum({<Year = ,Month = >}[Quantity On Hand])*sum({<Year = ,Month = >}[Unit Cost]),WareHouse,InventoryStockCode)))


Regards,

Kaushik Solanki

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!
sunny_talwar
MVP
MVP

Just to be safe, I would add set analysis to the first Sum as well

Sum({<Year, Month>}Aggr((Sum({<Year, Month>}[Quantity On Hand])*Sum({<Year, Month>}[Unit Cost])), WareHouse, InventoryStockCode))

Not applicable
Author

Hi Sunny

Thanks your suggestion worked fine ....You are a star !!!!

Regards

Innocent

sunny_talwar
MVP
MVP

I am glad I was able to help, please close this thread if you got what you were looking for by marking correct and helpful answers. Qlik Community Tip: Marking Replies as Correct or Helpful

Thanks,

Sunny

hirenjadiya
Partner - Contributor III
Partner - Contributor III

Hi Sunny,

Thanks for the above solution. It helped me to ignore selection while doing AGGR() Function.

Regards,

Hiren Jadiya

lalita_sharma
Contributor III
Contributor III

Hi All

I have a similar expression where I want to ignore anything selected in Date filter. It doesn't seem to work.

Could you please help?

=IF(GetSelectedCount(Workstream)=0,
Aggr(only({$<[Workstream Id]={'$(vCalc_StatusPack_DefaultWorkstreamID)'},[KPI name]={3}, Date =>}[Workstream]),[Workstream],[Workstream Id],[Risk Id],[KPI name],Date),
Aggr(only({$<[KPI name]={3},Date =>}[Workstream]),[Workstream],[Workstream Id],[Risk Id],[KPI name],Date))

 

 

My data looks like below

Risk IdWorkstreamWorkstream IdKPI nameDate
-C 1103/09/2021
-C 1227/08/2021
R004C 1310/07/2021
R007C 1310/07/2021
-A 5103/09/2021
-A 5227/08/2021
R027A 5310/07/2021
R028A 5310/07/2021

 

I am trying to create a straight table like below

Risk IdWorkstreamWorkstream IdKPI nameDate
R004C 1310/07/2021
R007C 1310/07/2021
R027A 5310/07/2021
R028A 5310/07/2021

 

the expression is for Workstream column. I dont want the data in this table to be affected by date filter selection.