Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have a table with multiple columns. Using few of the columns I have to calculate another column named 'Final Data'. I am doing this by a measure instead of adding a calculated column in the table. Further, I need to create a measure that calculates AVERAGEIF equivalent on 'Final Data' by applying various conditions and then plot on a chart.
As it turns out, the following expression gives me an error
Avg(If([Asset] = 'A', [Final Data])) where 'Asset' is the name of an actual column in my master table and ‘Final Data’ is the measure I used to create the column I needed.
This seems to only work for actual columns and not measures.
Please suggest what can be done.
Does If([Asset] = 'A', Avg([Final Data]),0) work for you?
No, it still returns an error.
Try this
Avg(Aggr(Sum({<Asset={'A'}>} [Final Data]), Dimension1, Dimension2))
What is an example of the entries for 'Dimension1' and 'Dimension2'? I am asking because I have a similar problem. Are they other fields?
Yes your dimensions fields it will aggregate your data based on that fields
Thank you!
Is that solution working?
@saurabh_Qlik1 what is the expression of Final Data?
Hi, thanks for your response.
The expression for 'Final Data' is a simple one:
=[Spread] / (([Change 1] + [Change 2] + [Change 3] + [Change 4])/4
where all these are columns in my dataset.