Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Guys,
I am trying to use the following formula within a bar chart to get an average
=Sum({1<[Type]={'A'}>}[Amount])/Sum({1}B)
The Dimension is C.
I need to get a straight line of average across the bar chart. Not sure what I am doing wrong here.. I've done this hundred times before with no issue.
The formula above returns a zigzag line that moves with the bars..
Let me know your thoughts and thanks in advance.
Best,
Alec
For some reason it doesn't work on my QVW even I am 100% sure that all the above is correct. I have used the reference line from the presentation tab as a solution as i don't think it is worthy to spend more time on this.
Thank you all for your help.
SUM({<Type = {'A'}>}Amount)/SUM(B)
The expression you have written generates a different value for each value of dimension (1 means that is valid not depending by selections ...)
So ... what kind of average do you need really?
I need to have one value across all dimensions. for example if you put the above formula in a text box it returns $1000. I need a line of $1000 to show across all the dimensions.
Hi,
you can implement your expression as Reference line.
You can achieve this chart->properties->Presentation->Reference Line -Expression.
this will help you.
In "Presentation" tab of the chart properties, add this expression in "Reference Lines" instead of adding it in "Expressions" tab. that will generate a straight reference line with the value you need. Is that what you are looking for?
create a variable with that expression with '=' sign and use it instead. if ref line is not ur alternative.
Can you provide sample data?
Hi Can you please give me an example.. I am getting an error.
The reference line works but I need to add it in an expression so I can see it in the legend.
Thxs,
Alec
Simply any table with B, Type and C columns where C is a state and Type has multiple types and B is the amount.
My PC wont let me attached QVWs..
Thxs,
Alec