Starting December 3, join live sessions with database experts and the Microsoft product team to learn just how easy it is to get started
Learn moreGet certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now
Hi, I am new to Power BI, and would like to achieve the following results for "Average by Customer" and Average by Customer Region" in the existing table.
This report is generated using Direct query mode using Tabular.
Calculation for "Average by Customer"
Measure1 = Sum by Product A
Measure2 = Sum by Product B
M% = Measure1/ Measure 2
Average by Customer = Average of M% by the count of distinct Products
Similarly , calculation for Average by Customer Region
Measure1 = Sum by Product A (Grouped by Customer Region)
Measure2 = Sum by Product B (Grouped by Customer Region)
M% = Measure1/ Measure 2
Average by Customer Region = Average of M% by the count of distinct Products
Excel calculation for Customer Region:
https://1drv.ms/x/s!ArLuftnPv6dwghbmVulAQkBdPywL?e=1cOGET
Thanks in advance for your assistance.
Solved! Go to Solution.
Hi, @PPD
Try to create measure as below:
M% = [Measure 2] /[Measure 1]
Average by customer = AVERAGEX(SUMMARIZE('Table','Table'[Product],'Table'[Customer Region],"M%",[M%]),[M%])
Average by Customer Region = CALCULATE( [Average by customer],ALL('Table'))
Please check attached pbix for more details.
Best Regards,
Community Support Team _ Eason
I leveraged the solution provided by @v-easonf-msft with a few modifications. It worked. Thank you!
Hi, @PPD
Try to create measure as below:
M% = [Measure 2] /[Measure 1]
Average by customer = AVERAGEX(SUMMARIZE('Table','Table'[Product],'Table'[Customer Region],"M%",[M%]),[M%])
Average by Customer Region = CALCULATE( [Average by customer],ALL('Table'))
Please check attached pbix for more details.
Best Regards,
Community Support Team _ Eason
Hi @v-easonf-msft Eason,
Thank you for your response, and sharing the PBIX file. Please see my response below.
@Ashish_Mathur .Attached the excel link. I couldnt attached the PBI file since this data model is created using direct query mode using Tabular.
Hi,
I believe your question has been answered.
Hi,
Share the download link of the Excel workbook. Also, share the download link of the PBI file.
Hi,
Share the MS Excel file with your calculations. I want to see how have you calculated figures in the "Customer by region" column
Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.
User | Count |
---|---|
94 | |
92 | |
82 | |
71 | |
49 |
User | Count |
---|---|
143 | |
121 | |
111 | |
59 | |
57 |