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

Announcements
Qlik Connect 2026 Agenda Now Available: Explore Sessions
cancel
Showing results for 
Search instead for 
Did you mean: 
oxiofrt
Partner - Creator
Partner - Creator

Median aggregate

Hi,
I have calculated a median which seems to be ok in the foot of a table. I would like to have this median on eache line (that is to say the global value repeated on each line, so as to be able to calculate difference between the value of the line and the median).
The application provided should help to understand.

Can you help ? Thanks a lot !

1 Solution

Accepted Solutions
Not applicable

Glad it works!

The difference between using the formula in the chart and in the variable is that the variable is applying the formula without the use of any dimensions. There should be a way to achieve the same thing using set analysis / total, but I couldn't get it to work.

I use variables in two ways:

1) To store formulas that I use in various places (then you DON'T place an equal sign before the formula)

2) To do dynamic calculations that evaluate usually to one value (like in your case). In this case you DO put an equal sign before the formula.

Cheers, Lukas

View solution in original post

5 Replies
Not applicable

Hi,

I hope I got what you're looking for... please take a look at the attached QVW, basically I took your formula into a variable and passed that to the table

oxiofrt
Partner - Creator
Partner - Creator
Author

Sure that is what I want to do ! Thanks a lot.

However, I don't understand why using a variable makes it work ? Formula is exactly the same... I thought that variable were just a 'name' on a formula which allow to reuse it several times ???

Not applicable

Glad it works!

The difference between using the formula in the chart and in the variable is that the variable is applying the formula without the use of any dimensions. There should be a way to achieve the same thing using set analysis / total, but I couldn't get it to work.

I use variables in two ways:

1) To store formulas that I use in various places (then you DON'T place an equal sign before the formula)

2) To do dynamic calculations that evaluate usually to one value (like in your case). In this case you DO put an equal sign before the formula.

Cheers, Lukas

oxiofrt
Partner - Creator
Partner - Creator
Author

Thanks a lot for this very clear explanation !

Big Smile

montubhardwaj
Specialist
Specialist

Hi Luka,

Thanks for your explanation about how to use "equal to sign". BUt can you explain in little detail. I dont think I got it clearly. Looks like very important fact and I am missing it...