Forum Discussion
Average on distinct values + filter
LisaB ,
The dax above needs to achieve/compare previous row but there's no row number in your original table, so we need to add an index from 0 or 1 as row number.
For Line Amount you want to achieve is always the first row in each Contract No, so we should also rank the rows in each Contract No using index column.
Community Support Team _ Jimmy Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- LisaB7 years agoHelper III
Hi v-yuta-msft ,
thank you for the clarification.
I don't think this formula will work for this case since there might be contracts when there is an active contract that does not include any of the ARR items. It might also be an inactive contract that include an ARR item. So only taking the first item (rank =1) will give the incorrect result.
Lisa
- LisaB7 years agoHelper III
Hi,
I have attached an example file showing my report.
I wish to show the average based on the page and report level filters. However, I would the average value to change if filtering by clicking on a bar in the chart.
Hope this clarifies.
Thank you.
Lisa