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

Announcements
We are aware of an issue with the Product Downloads page and looking into it.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Scripting

Hi Team,

Can any one give the solution.

These are actual table fields.

A               B         C

Health        3         -

Health        -         15

but I require B/C in scripting.

Thanks

krish

Labels (1)
15 Replies
sunny_talwar
MVP
MVP

May be this:

LOAD A,

          RangeMax(B) as B,

          RangeMax(C) as C,

          Sum(B)/Sum(C) as [B/C]

From ...

Group By A;

florentina_doga
Partner - Creator III
Partner - Creator III

try this

z:

load * inline [A, B, C

Health, 3,

Health,, 15];

zz:

load *,(b/c) as bc;

load A,

sum(alt(B,0)) as b,

sum(alt(C,0)) as c

resident z group by A;

drop table z;

sunny_talwar
MVP
MVP

My bad, may be this:

LOAD A,

          Sum(B) as B,

          Sum(C) as C,

          Sum(B)/Sum(C) as [B/C]

From ...

Group By A;

Anil_Babu_Samineni
MVP
MVP

A               B         C

Health        3         -

Health        -         15

From this What are you expecting

A               B         C          B/C

Health        3         -            3/-

Health        -         15          -/15    

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
sunny_talwar
MVP
MVP

I think something like this:

Capture.PNG

Not applicable
Author

Hi Sunny,

Thank you for given information.

Regards,

krish