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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Column Percentage

I'm sure I'm writing wrong this formula

=Sum({<[Codice Documento]= {'CLI-SCONTRINO','NEG-FATIMM','FOR-DDTRESO','INT-BUONOSCA','SCA-DANN-FURTI'}>} [QTA 1 Documento])/sum (total({<[Codice Documento]= {'CLI-SCONTRINO','NEG-FATIMM','FOR-DDTRESO','INT-BUONOSCA','SCA-DANN-FURTI'}>} [QTA 1 Documento]))

I need to calculate the column percentage...how should it be written the formula? My problem is that this variable [Codice Documento] must respect those values {'CLI-SCONTRINO','NEG-FATIMM','FOR-DDTRESO','INT-BUONOSCA','SCA-DANN-FURTI'}....

thanks to everyone!

Labels (1)
1 Solution

Accepted Solutions
lironbaram
Partner - Master III
Partner - Master III

hi

you need to put the total after the set analysis part

your Expression should look like this:

=Sum({<[Codice Documento]= {'CLI-SCONTRINO','NEG-FATIMM','FOR-DDTRESO','INT-BUONOSCA','SCA-DANN-FURTI'}>} [QTA 1 Documento])/sum ({<[Codice Documento]= {'CLI-SCONTRINO','NEG-FATIMM','FOR-DDTRESO','INT-BUONOSCA','SCA-DANN-FURTI'}>} TOTAL  [QTA 1 Documento])

View solution in original post

13 Replies
Clever_Anjos
Support
Support

It looks correct.

Make a simple test:

1) add this expression

Sum( [QTA 1 Documento])/sum (total [QTA 1 Documento])

2) Add a listbox to [Codice Documento] and select 'CLI-SCONTRINO','NEG-FATIMM','FOR-DDTRESO','INT-BUONOSCA','SCA-DANN-FURTI' using control-click


Is this value correct?

lironbaram
Partner - Master III
Partner - Master III

hi

you need to put the total after the set analysis part

your Expression should look like this:

=Sum({<[Codice Documento]= {'CLI-SCONTRINO','NEG-FATIMM','FOR-DDTRESO','INT-BUONOSCA','SCA-DANN-FURTI'}>} [QTA 1 Documento])/sum ({<[Codice Documento]= {'CLI-SCONTRINO','NEG-FATIMM','FOR-DDTRESO','INT-BUONOSCA','SCA-DANN-FURTI'}>} TOTAL  [QTA 1 Documento])

Not applicable
Author

I know that I can do it in that way, but I'm forced to put that set of values within...I cannot filter those values otherwise other dimension values' change...

Clever_Anjos
Support
Support

No,

=sum( {<Dim1={"A"}>} total Expression1) and

=sum(total  {<Dim1={"A"}>} Expression1) returns same value

Not applicable
Author

thank you soooo much Liron Bra'am!!!

Clever_Anjos
Support
Support

It was just a test

Is this expression into same app, right?

Guide me to find where you are using this expression

Not applicable
Author

I must added that formula in the chart "Riepilogo ENTRATE" and "Riepilogo USCITE". Your solutions was correct, the point is that I needed to embody [Codice Documento]= {'CLI-SCONTRINO','NEG-FATIMM','FOR-DDTRESO','INT-BUONOSCA','SCA-DANN-FURTI'} within the formula...

swuehl
Champion III
Champion III

The issue is probably due to the use of additional round brackets after total, try removing them:

=Sum({<[Codice Documento]= {'CLI-SCONTRINO','NEG-FATIMM','FOR-DDTRESO','INT-BUONOSCA','SCA-DANN-FURTI'}>} [QTA 1 Documento])/sum (total {<[Codice Documento]= {'CLI-SCONTRINO','NEG-FATIMM','FOR-DDTRESO','INT-BUONOSCA','SCA-DANN-FURTI'}>} [QTA 1 Documento] )

Not applicable
Author

it says that there is an error in the expression...it doesn't work...