Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

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.


InkedCattura7_LI.jpg

Thank you,

Isabela

6 Replies
agigliotti
Partner - Champion
Partner - Champion

give a try with:

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

/

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

Anonymous
Not applicable
Author

It Gives me the same mistake like in the screenshot.

agigliotti
Partner - Champion
Partner - Champion

which chart object, dimensions and measures are you using ?

Anonymous
Not applicable
Author

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.

InkedInkedCattura7_LI.jpg

agigliotti
Partner - Champion
Partner - Champion

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

Anonymous
Not applicable
Author

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