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

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
kunkumnaveen
Specialist
Specialist

how to write expression

Hello All,

                 i am able to achieve my requirement  partially . the thing is i am trying to display only those materials,spend which has supplied by multiple vendors

Expressions i tried :

1)Sum({<SCOPE={'Yes'},Material={"=Count(Distinct [VENDOR CODE)>1"}>}SPEND)

2)If(Count(distinct TOTAL <Material> [VENDOR CODE])>1,Sum({<SCOPE={'Yes'}>}SPEND))


but both the expressions are giving me list of  multiple vendors and single vendors materials , as below


Capture.PNG

All the 100% rows are  single vendor supplied material

so how to not display this 100% rows

Any suggestion plz.....

15 Replies
kunkumnaveen
Specialist
Specialist
Author

Please find my sample data

effinty2112
Master
Master

Dear Naven,

Hera are the first few rows of a straight table that may be what you want.

Material TotalCount of Vendor
146952889.27 31
0000000A713637439.284
000A490668592.722
000A760481471.202
000A85278765439.714
000A8653129844.202
000A86612064547.663
00A615668062.202
00A6360488119.622
0A11775273441.192
0A0012268P042926115.312
0A0020115E0533124364.883
0A0050857D011325451.303

Total: aggr(if(Count([VENDOR CODE])>1, Sum(Spend1)),Material)

Count of Vendor: aggr(if(Count([VENDOR CODE])>1, Count([VENDOR CODE])),Material)

kunkumnaveen
Specialist
Specialist
Author

Thanks For  your kindly help, but walker ,for each material ur showing aggr value what I am looking is individual value for each material rather then aggr value

effinty2112
Master
Master

Naveen,

Do you want the sum for each vendor for each product?

try:

Material VENDOR CODE Expr
93552942.91
0000000A7DG028A4389941.03
0000000A7DI0095585682.71
0000000A7DS0931649215.70
0000000A7DS093C2012599.84
000A490DP064650880.72
000A490PLMA0117712.00
000A760DM071118352.62
000A760DS109363118.58
000A852DD01915131714.22
000A852DE00423883222.60
000A852DE02632170113.22
000A852DS0647580389.67

Where Expr : aggr(NODISTINCT if(Count(TOTAL<Material> [VENDOR CODE])>1, Sum(Spend1)),Material,[VENDOR CODE])

Kushal_Chawda

try this

=Sum({<Material={"=Count(Distinct {< SCOPE={'Yes'}>}[VENDOR CODE])>1"}>}SPEND)

Kushal_Chawda

or

sum(aggr(if(Count(Distinct {< SCOPE={'Yes'}>}[VENDOR CODE])>1,SPEND),Material,[VENDOR CODE]))