Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Announcements
BI & Data Trends 2021. Discover the top 10 trends emerging in today. Join us on Dec. 8th REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Contributor III
Contributor III

Average Absolute Variable

Hi,

I am trying to calculate the average of the variable I have created.

vAbsoluteValue = FABS(-(Sum({<[Plan Type Description]=, [SK Plan Type No] = {2}, Year={$(vMaxYear)}>}[Fct Scl Binc Sale Sell Amt]) - Sum({<[Plan Type Description]=, [SK Plan Type No] = {1}, Year={$(vMaxYear)}>}[Fct Scl Binc Sale Sell Amt]))
/
Sum({<[Plan Type Description]=, [SK Plan Type No] = {2}, Year={$(vMaxYear)}>}[Fct Scl Binc Sale Sell Amt]))

Average Value =Avg($(vAbsoluteValue)) is returning a zero value

Please assist

Thanks.

3 Replies
Highlighted
Partner
Partner

What is the problem with the expression?
Which result do you get from using your expression and which result are your expecting to get?

Maybe you could attach some screenshots that will help us inderstand?
Plees ekskuse my Swenglish and or Norweglish spelling misstakes
Highlighted
Contributor III
Contributor III

The average expression is not returning any values.

I want the result to return the average value for the variable created (vAbsoluteValue)

Highlighted
Partner
Partner

Couple of questions
1- is the variable being evaluated immediately? or are you using the string in expression
2- please elaborate what kind of chart and dimensions you are using for the average