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

Margin % calculatory measure not working

Hi,

I tried to make calculatory measure to my table with the following expression but it is not returning values. Can anyone comment what

is wrong with my formula?

num([Division Margin]/[NetSales], '#,#0%')

Thanks,

Petri

5 Replies
niclaz79
Partner - Creator III
Partner - Creator III

Hi,

Try this:

num(Sum([Division Margin])/Sum([NetSales]), '#,#0%')

prma7799
Master III
Master III

Missing Sum keyword

Try below

num(Sum([Division Margin])/(Sum([NetSales])), '#,#0%')

Mark_Little
Luminary
Luminary

HI Petri,

As suggested you are missing your aggregator, When you do any calculations in measures you should add an aggregator, so Qlik know how to calculate your result correctly, I.e. Sum(), Avg(), Max(). What is needed really depends on your data and what you are trying to show.

Mark

Anonymous
Not applicable
Author

Thanks all. Problem solved 🙂

oknotsen
Master III
Master III

If your question is now answered, please flag the Correct Answer (via the big "Correct Answer" button near every post; not visible in preview) and Helpful Answers (found under the Actions menu under every post).

If not, please make clear what part of this topic you still need help with .

May you live in interesting times!