Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
vikas_nandanwar
Creator II
Creator II

Division Calculation in expression

Hi All,

I want expression to be written in Guage for calculating Profitability with given parameters -

Where

Profit is - P1,P2,P3....Pn

Value is - V1,V2,V3....Vn

Guage should calculate - Profitability -

(P1+P2+P3+....+Pn) / (V1+V2+V3+...+Vn)


div(Sum(Profit),Sum(value)) is not working in expression


Please guide


Thanks,

Vikas

1 Solution

Accepted Solutions
vikas_nandanwar
Creator II
Creator II
Author

I got it

Sum(Profit)/Sum(Value) gave me the desired answer.

Thanks for the help.

View solution in original post

19 Replies
Anil_Babu_Samineni

You said P1, P2, P3 ... Pn. But all are string or numbers

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
vikas_nandanwar
Creator II
Creator II
Author

@Anil,

Its a table where P1, P2 P3 are Profit numbers for Item1, Item2, Item3... Itemn corresponding to Final Value of V1, V2 V3

Anil_Babu_Samineni

Can you show data please how profit and and value looks?

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
vikas_nandanwar
Creator II
Creator II
Author

ItemTypevalueProfit
Low MakeableC1,302.4078.10
CubesM1,178.1094.20
CubesM2,077.50145.40
CubesM3,945.92315.70
CubesM1,952.50156.20
High MakeableM509.8656.10
High MakeableM3,063.9576.60
High MakeableM1,105.5671.90
BlacksM1,385.0013.90
BlacksM2,552.0025.50
BlacksM1,488.36

14.90

Anil_Babu_Samineni

Seems working

Capture.PNG

Or

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
qlikview979
Specialist
Specialist

Hi are you expecting like this in Guage chart

Untitled.png

vikas_nandanwar
Creator II
Creator II
Author

Yes I am expecting this calculation

But when i put the below expression in Qlik sense,

Div(Sum(Profit),Sum(value))

the calculated field shows "0"

vikas_nandanwar
Creator II
Creator II
Author

NO

Anil_Babu_Samineni

Seems, Qliksense also working

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