Skip to main content
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: 
sbkumar
Creator
Creator

How-to-ignore-selection-when-using-Rank-and-Aggr

hi friends

For an application, I need to ignore a certain search filter using Set Analysis into an aggregate function.

 

The AGGR function is:

Aggr(
if(rank(sum({<$(vTime_Frame)={1}, [Therapeutic Category] = {$(vMarketValue)},Territory=>}TRX)/sum({<$(vTime_Frame)={1},[Therapeutic Category] = {$(vMarketValue)},Territory=>} Total <IMS_ID_Searchable> TRX))<=5,
(sum({<$(vTime_Frame)={1}, [Therapeutic Category] = {$(vMarketValue)},Territory=>}TRX)/sum({<$(vTime_Frame)={1}, [Therapeutic Category] = {$(vMarketValue)},Territory=>}Total<IMS_ID_Searchable>TRX))),IMS_ID_Searchable,[Payer Channel])

 

if i remove Territory=  data is coming correctly,if i include  Territory= ,it is showing as  NO Data to display.

 

Finally I need to Include Territory in the expression.

3 Replies
saar_lorena
Contributor III
Contributor III

What if you include an Only() ?

Something like:

Aggr(Only(
if(rank(
sum({<$(vTime_Frame)={1}, [Therapeutic Category] = {$(vMarketValue)},Territory=>}TRX)
/
sum({<$(vTime_Frame)={1},[Therapeutic Category] = {$(vMarketValue)},Territory=>} Total <IMS_ID_Searchable> TRX))<=5,

(sum({<$(vTime_Frame)={1}, [Therapeutic Category] = {$(vMarketValue)},Territory=>}TRX)/sum({<$(vTime_Frame)={1}, [Therapeutic Category] = {$(vMarketValue)},Territory=>}Total<IMS_ID_Searchable>TRX))),IMS_ID_Searchable,[Payer Channel]))

 

If it doesn't work, can you upload a qv example here? Thanks 😃

 

sbkumar
Creator
Creator
Author

Thanks  Saar_lorena but not  its not working ...

saar_lorena
Contributor III
Contributor III

Can you upload an example of your file here, please?