Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
kunkumnaveen
Specialist
Specialist

how to write expressions

hello,let say i have date like below

supplier        parts            value

A                  ice                  100

B                  ice                  200

C                  ice                  300

D                  ice                  400

J                chemical            200

L                sugar                500

M                sugar              1000

...............................

...............................

.................. so on

let say i got thousands of supplier

i want to display only those parts which  has been supplier by more then one Supplier and i want to show % of that particular supplier among other supplier who supplies same parts.i mean

supplier          part              value            %of that supplier

A                  ice                  100                      100/100+200+300+400

B                  ice                  200                      200/100+200+300+400

C                  ice                  300                      300/100+200+300+400

D                  ice                  400                      400/100+200+300+400

L                sugar                500                        500/1000+500

M                sugar              1000                      1000/1000+500

Note :i dont want to display chemical because it is supplied by only one supplier

so what expressions do i need write


I tried this in calculated dimension to display only those parts which has multiple supplier


1)

if(count(distinct supplier)>1,part)  (Invalid dimension error)

2)%of that supplier

sum(%of that supplier)/sum(total %of that supplier)

which is also wrong

how to write this expressions

Thanks

Naveen

1 Solution

Accepted Solutions
rahulpawarb
Specialist III
Specialist III

Hello Naveen,

Extremely sorry brother. Yesterday I left office early. Please see my response on your email. Deselecting the show zero values option present under the Add-ons - Data handling section of table object will give you desired results.

Please let me know if this is not expected response.

Regards!

Rahul

View solution in original post

15 Replies
kunkumnaveen
Specialist
Specialist
Author

Any suggestions how to write calculate dimension plz.....

rahulpawarb
Specialist III
Specialist III

Hello Navin,

Trust that you are doing great!

Please refer attached sample application.

Regards!

Rahul

kunkumnaveen
Specialist
Specialist
Author

sorry i have personal addition ,i wont be able to open ur file ,will u please copy paste for me.....

Anil_Babu_Samineni

May be you can use this?

(Sum({<parts = {'=Count(parts)>1'}>}value)  / Sum(TOTAL <parts> value))

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
kunkumnaveen
Specialist
Specialist
Author

Expression:

=if(count(distinct supplier)>=2,part)

Untitled.png

kunkumnaveen
Specialist
Specialist
Author

what about calculated dimension ,

i mean only to display part name which had more then one supplier

i tired this but no use

=if(count(distinct supplier)>=2,part)

rahulpawarb
Specialist III
Specialist III

Hello Navin,

Add supplier & parts as dimension. Post that add below expressions:

//value

If(Count(TOTAL <parts> supplier)>1,Sum(value))

//%of that supplier

If(Count(TOTAL <parts> supplier)>1, Sum(value) / Sum(TOTAL <parts> value))

Hope this will be helpful.

Regards!

Rahul

Anil_Babu_Samineni

What are you expecting? I got like below

Capture.PNG

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
kunkumnaveen
Specialist
Specialist
Author

when  i tried ur expression with sample data in qlikview i am getting perfect output,

but when i put same expression with my orginal data in qliksense i am not getting same output.

if u can help me more i can attach my qvf file if u send ur mail id , i cant share it on community . please