Forum Discussion
Check if sliced value is higher than total average value
Hi all,
I'm probably going to make this sound more complicated than it is but what I'm looking to do is see if the slicer value is higher or lower than the average of a column.
For example:
| Shop | Average Order Value | Applications | Applications £ |
| 1123 | £1,111 | 5 | £3,409 |
| 1124 | £2,222 | 9 | £6,958 |
I've got a slicer set up to select the shop number and it will then show the applications and applications £ on cards underneath. What I want to add in is the % above average of the total of applications for example so the average of the applications would be 7, the shop 1123 has done 5 so I'm looking to work out the % difference between that.
I want to do this for each card that I've got setup on the dashboard.
All my data is in one table as well.
Hi Anonymous
I imported that data and set up the following example based on New Applications.
Let me know if you still have the same problem. If so, please show your expected results for New Applications by Store.
pbix: Pct above Avg 1.pbix
8 Replies
- grantsamborn
Solution Sage
Hi Anonymous
Would something like this help?
Pct above Avg = DIVIDE( SUM( 'DataTable'[Applications] ), CALCULATE( AVERAGE( 'DataTable'[Applications] ), ALL( 'DataTable'[Shop] ) ) ) - 1pbix: Pct above Avg.pbix
- AnonymousNot applicable
Thanks for that. It's giving me a value but it seems to be working it out wrong somewhere.
One column I have in Excel averages out at 5 and the slicer shows 16 but the DAX code above is showing it as 244.23% above when I think it should be 320%?- grantsamborn
Solution Sage
I guess I'll need more than 2 lines of sample data.
Also, please show your expected results from the sample data supplied.
https://community.powerbi.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523