Qlik Community

Ask a Question

New to Qlik Sense

If you’re new to Qlik Sense, start with this Discussion Board and get up-to-speed quickly.

Announcements
Our May 2021 end-to-end product release from Data Integration to Data Analytics is out! READ DETAILS
cancel
Showing results for 
Search instead for 
Did you mean: 
dries_clairhout
Creator
Creator

Dividing for percentage

Good day everyone,

 

I am making a profit loss statement for a client of mine,

I already got this far:

 

clipboard_image_0.png

 

Now iWould have to get a percentage as a second measure.

This percentage should represent the number divided by the number shown next to "OMZET" =  345.640 for 2018

OMZET is the total amount of the 70 accounts. So that every measures shows how much percent it takes from the OMZET.

 

Any ideas how?

To achieve the above, I already had to make an excel for the parameters, wich accounts to use.

 

Thanks in advance

Dries

6 Replies
dries_clairhout
Creator
Creator
Author

This is what i'm trying right now:

 

if(sum(Debet) > sum(Credit), sum(Credit) - sum(Debet)) &' '& if(sum(Credit) > sum(Debet), sum(Credit) - sum(Debet))

/

if(SubRubriek = 'Omzet', if(sum(Debet) > sum(Credit), sum(Credit) - sum(Debet))) &' '& if(SubRubriek = 'Omzet', if(sum(Credit) > sum(Debet), sum(Credit) - sum(Debet)))

martinpohl
Partner
Partner

Hi,

calculate

Your Expression / sum({<Rubriek = {OMZET}>} total value)

and format it to decimal in numbers

Regards

dries_clairhout
Creator
Creator
Author

Hello,

 

if(sum(Debet) > sum(Credit), sum(Credit) - sum(Debet)) &' '& if(sum(Credit) > sum(Debet), sum(Credit) - sum(Debet))

/

sum({<SubRubriek = {'Omzet'}>} total value )

 

 

This returns the same number as the original formule x 100

clipboard_image_0.png

martinpohl
Partner
Partner

1. instead of reply your expression you can use label of the expression

2. sum (total value) is a placeholder for your correct expression

dries_clairhout
Creator
Creator
Author

Hello,

already many thanks,

but I don't understand.

So like this?

if(sum(Debet) > sum(Credit), sum(Credit) - sum(Debet)) &' '& if(sum(Credit) > sum(Debet), sum(Credit) - sum(Debet))

/

sum({<SubRubriek = {'Omzet'}>} total if(sum(Debet) > sum(Credit), sum(Credit) - sum(Debet)) &' '& if(sum(Credit) > sum(Debet), sum(Credit) - sum(Debet)))

dries_clairhout
Creator
Creator
Author

hello,

 

I think it has something to do with negative outcome.

The + numbers are correct,

but the - numbers show an insane percentage.