The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
Hello,
I want to calculate an avarage of a measure that I calculated before.
How can I do it?
This is the measure:
Hi
Try this
AVERAGEX(
SUMMARIZE('YourTable', 'YourTable'[Employee_Number], 'YourTable'[Customer_Key]),
[Orders Report-Treated Customers Percentage%]
)
You can create a new measure by using the AVERAGEX function to calculate the daily average of your measure Cus_Percentage in the context of the month. For example:
Promedio Cus_Percentage Mes =
AVERAGEX(
VALUES('Tabla'[Fecha]),
[Porcentaje de clientes tratados con informes de pedidos %]
)
This will loop through each day of the month shown, take the daily value of Cus_Percentage, and calculate the average to display in your monthly visualization.
Hi @Anonymous
Do you want to show the average of Cus_Percentage by Month? Here I build a sample to have a test.
Try this measure:
Avg of Percentage% = AVERAGEX('Table',[Orders Report-Treated Customers Percentage%])
Build a visual by Year column and Month column.
Best Regards,
Rico Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hello RicoZhou 🙂
If In need to create monthly AVG measure for employee and customer level, how can i solve it?
I tried to use the query you mentioned in you answer but it didnt work for me.
I the report i don't need to show months - only the calculations.
I built a visual with the following columns:
employee_ID, Customer_Key, Original_amount_defacto, UpSale_Amount, Delivery_month.
and used your measure.
@Anonymous This looks like a measure aggregation problem. See my blog article about that here: https://community.powerbi.com/t5/Community-Blog/Design-Pattern-Groups-and-Super-Groups/ba-p/138149
The pattern is:
MinScoreMeasure = MINX ( SUMMARIZE ( Table, Table[Group] , "Measure",[YourMeasure] ), [Measure])
MaxScoreMeasure = MAXX ( SUMMARIZE ( Table, Table[Group] , "Measure",[YourMeasure] ), [Measure])
AvgScoreMeasure = AVERAGEX ( SUMMARIZE ( Table, Table[Group] , "Measure",[YourMeasure] ), [Measure])
etc.
Hi Grag,
What is the difference between [YourMeasure] and [Measure], because i'm not realy sure what to add.
for example here:
AvgScoreMeasure = AVERAGEX ( SUMMARIZE ( Table, Table[Group] , "Measure",[YourMeasure] ), [Measure])