# New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

New Contributor

## Ratio in Account Balance

Hello,

i am new using QlikSense and I have a problem in calculating a ratio.

I need to calculate the ratio by dividing each voice of Account Balance By revenue that in this case is highlighted in yellow.

So i need to do : -16-487.675,09/ 30.833.658,42 or -2.125.011,63/30.833.658,42 end so on.

Now my measure is like this but i can't fix the voce of revenue as denominator:

num( (sum (if ( [Anno Fiscale] = \$(vAnnoFiscale),[Valore]))

/

(sum (if ([Voce Conto Economico]= 'A' and [Anno Fiscale] = \$(vAnnoFiscale),[Valore])))),

'%#.##0,0')

Where [Voce Conto Economico] is the voce of the account Balance and 'A' is the Revenue.

Thank you,

Isabela

6 Replies
Honored Contributor II

## Re: Ratio in Account Balance

give a try with:

sum( {< [Anno Fiscale] = {"\$(vAnnoFiscale)"} >} Valore )

/

sum( {< [Anno Fiscale] = {"\$(vAnnoFiscale)"}, [Voce Conto Economico] = {"A"} >} Valore )

New Contributor

## Re: Ratio in Account Balance

It Gives me the same mistake like in the screenshot.

Honored Contributor II

## Re: Ratio in Account Balance

which chart object, dimensions and measures are you using ?

New Contributor

## Re: Ratio in Account Balance

I want to calculate the RATIO AMOUNT. With the numers from the table i need to do : -16-487.675,09/ 30.833.658,42 or -2.125.011,63/30.833.658,42 end so on but i have only "1" in case of the Revenue and that is ok but instead of the others ratio i have "-"  that because i have the Revenue and so the denominator = 0.

Honored Contributor II

## Re: Ratio in Account Balance

I suggest you to post a sample app with the desired result.

Contributor

## Re: Ratio in Account Balance

Ratio = sum(Actual Amount)/ sum({<Voce Conto Economico={'Totale Ricavi Di Commessa'}>}Actual Amount)