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

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
zenobendi
Contributor III
Contributor III

Percentage based on a dynamic field value

Hi everyone,

I am having a problem on calculating a percentage in a straight table. 

In particular I have a structured table like the one below where the second field, "BILS_Base_Code" is always equivalent to a specific value of the "BILS_Liv_Cod" field and I would need to calculate a percentage that shows me the value of the BILS_Liv_Cod by comparing it with the value of the corresponding BILS_Base_Code (since the real table is really big: 1000+ rows). Please also note that in the real table the field "BILS_Base_Code" is filled in each row.
 
Just to make an example, where the BILS_Liv_Cod=80, I need a formula that shows -3.058.072/6.243.119 (so the value where BILS_Liv_Cod=50)

zenobendi_0-1634556921269.png

 

Thank you for your time,

Zeno

 

1 Reply
abhijitnalekar
Specialist II
Specialist II

Hi @zenobendi ,

Can you please try something like below.

sum(Bil_val_cad)/Sum({blis_live_code=blis_base_code}Bil_val_cad)

also please share the sample data so that i can also check at my end if there is any other way we can do this 

Regards,
Abhijit
keep Qliking...
Help users find answers! Don't forget to mark a solution that worked for you!