Hitman
July 20, 2020, 5:55am
1
Hi All,
Confusing myself with Averages.
I have a table with X amounts of clients and Prices for various days.
In a table i wanted to do the price per the table for each client on any date less the average price for all clients.
I was using the below and have tried a variety of averages but am getting myself more confused
CALCULATE([Calculated Price],All(‘Parent Mapping’[Parent]))
Help would be appreciated to stop me going crazy…
Please attach a PIBX File. I believe Averagex will help.
Hitman
July 20, 2020, 7:28am
3
Hi Piryani,
Apologies that was lazy of me. I have thrown a rough example in the attached. I know the attached is not correct but i didnt want to include the mess that i had made ; )
Averages_Example.pbix (19.1 KB)
Hitman
July 20, 2020, 9:07am
4
Hi guys did that make sense- Help would be massively appreciated
Something like this?
Average Price = AVERAGEX( ALLSELECTED( ‘Table’ ), ‘Table’[Price] )
Hitman
July 20, 2020, 10:16am
6
Thanks but slight amendment (still average based) - Someone has changed their mind what they require on my side
I need to calculate the average price per week per client (if quantity is <>0) less the average price for all clients (Where quantity <>0)
I have managed to get to the following:
(A) Weekly Average (ALL clients) = calculate(AVERAGE(Data[ Price]),ALLEXCEPT(Data,Date_Table[Week of Year]))
(B) Weekly Average (Client) = calculate(AVERAGE(Data[Price]),ALLEXCEPT(Data,‘Parent Mapping’[Parent],Date_Table[Week of Year]))
A-B equals the weekly average for all clients less the weekly average for selected client)
The issue now is that i only want to use the price in both calculations where quantity <>blank/0
Thanks for the help all - Averages are not my strong point. You could say im below Average
Hitman
July 20, 2020, 11:48am
7
Sorry guys - Anyone able to assist. Just need to say in above formula
Only price in average if quantity <> 0 / blank
Thanks
Hitman
July 20, 2020, 12:57pm
8
Figured it out guys with an If statement. Im all good now
1 Like