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: 
Amiran
Partner - Contributor II
Partner - Contributor II

set analysis for a dimension

Hi,
I am trying to create a set analysis for a dimension where the final_net_wight is less than crop_forcast give me the grower names,
 
can anyone help me to find out what's wrong with this:
 
aggr(ONLY({<FINAL_NET_WEIGHT={"<CROP_FORECAST"}>}GROWER_NAME),GROWER_NAME)
 
2 Solutions

Accepted Solutions
Taoufiq_Zarra

@Amiran  you can for example use in dimension :

=aggr(only({<grower_name={"=final_net_wight<crop_forcast"}>}grower_name),grower_name)

and supress when value is null

like :

Taoufiq_Zarra_0-1607432398593.png

 

Regards,
Taoufiq ZARRA

"Please LIKE posts and "Accept as Solution" if the provided solution is helpful "

(you can mark up to 3 "solutions") 😉

View solution in original post

Amiran
Partner - Contributor II
Partner - Contributor II
Author

it works, thank you very much!

I had to turn nulls into 0 and to use sum()

=aggr(only({<GROWER_NAME={"=sum(FINAL_NET_WEIGHT)>sum(CROP_FORECAST)"}>}GROWER_NAME),GROWER_NAME)

View solution in original post

4 Replies
Taoufiq_Zarra

@Amiran  can you share a sample data and the expected output ?

Regards,
Taoufiq ZARRA

"Please LIKE posts and "Accept as Solution" if the provided solution is helpful "

(you can mark up to 3 "solutions") 😉
Amiran
Partner - Contributor II
Partner - Contributor II
Author

Hi @Taoufiq_Zarra ,

here is a sample data:

data:
LOAD * inline [
grower_name, final_net_wight, crop_forcast
aa, 450, 500
bb, 351, 200
cc, 215, 100
dd, 231, 300
ee, 789, 500
ff, 654, 670
]

 

when using the set analysis I expect to have these values in the dimension:

aa,
dd,
ff

 

thank you

Taoufiq_Zarra

@Amiran  you can for example use in dimension :

=aggr(only({<grower_name={"=final_net_wight<crop_forcast"}>}grower_name),grower_name)

and supress when value is null

like :

Taoufiq_Zarra_0-1607432398593.png

 

Regards,
Taoufiq ZARRA

"Please LIKE posts and "Accept as Solution" if the provided solution is helpful "

(you can mark up to 3 "solutions") 😉
Amiran
Partner - Contributor II
Partner - Contributor II
Author

it works, thank you very much!

I had to turn nulls into 0 and to use sum()

=aggr(only({<GROWER_NAME={"=sum(FINAL_NET_WEIGHT)>sum(CROP_FORECAST)"}>}GROWER_NAME),GROWER_NAME)