Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
janturon
Contributor III
Contributor III

Set Analysis - Percentage share of rows to one row

Hi,

I need to help with one expression. I have table with accounts in rows and prices. I need expression for pecentage share all rows with only one row (account 604). Table in excel looks like this:

%from604 = price / price(account(604))

   

accountprice%from604
5011 225,00 €84,48%
5021 331,00 €91,79%
5031 001,00 €69,03%
504502,00 €34,62%
6041 450,00 €100,00%
6052 136,00 €147,31%
6071 200,00 €82,76%
1 Solution

Accepted Solutions
sunny_talwar

Seems like you have a second dimension (let's call it PriceType)... in that case modify your expression to this

Sum(price)/Sum(Total <PriceType> {<account={'604'}>} price)

View solution in original post

4 Replies
tresesco
MVP
MVP

Sum(price)/Sum(Total {<account={'604'}>} price)

Then in the presentation tab, enable 'Show in Percent(%)'

janturon
Contributor III
Contributor III
Author

Doesnt work, If you have more columns like thist:

    

p01p01p02p02
acoountprice%from604price%from604
5011 225,00 €84,48%1 285,00 €64,22%
5021 331,00 €91,79%1 325,00 €66,22%
5031 001,00 €69,03%1 152,00 €57,57%
504502,00 €34,62%800,00 €39,98%
6041 450,00 €100,00%2 001,00 €100,00%
6052 136,00 €147,31%6 045,00 €302,10%
6071 200,00 €82,76%1 100,00 €54,97%
sunny_talwar

Seems like you have a second dimension (let's call it PriceType)... in that case modify your expression to this

Sum(price)/Sum(Total <PriceType> {<account={'604'}>} price)

janturon
Contributor III
Contributor III
Author

thank you very much. it works 🙂