Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Solved! Go to Solution.
Hi @Akansha2025,
Create Base Measures
Total Sales
[Total Sales] = SUM(table1[Sales])
Max Visits per Group (used later)
[Max Visits] = MAX(table1[Visits])
Next Create Matrix Visual
Rows: Region, Year, Month
Values:[Total Sales], [Visits], Custom % Measure
Create Percentage Measure
This measure calculates the correct percentage for each row, but the total will be incorrect:
[Sales per Max Visit] =
DIVIDE(SUM(table1[Sales]), MAX(table1[Visits])) * 100
At the total level, MAX does not preserve context, causing the total to be inaccurate.
Use SUMX Over a Grouped Table
Weighted Calculation (Total Sales / Total Max Visits)[Corrected Measure Weighted] =
VAR SummaryTable =
SUMMARIZE(
table1,
table1[Region],
table1[Year],
table1[Month],
"Sales", SUM(table1[Sales]),
"MaxVisit", MAX(table1[Visits])
)
RETURN
DIVIDE(
SUMX(SummaryTable, [Sales]),
SUMX(SummaryTable, [MaxVisit])
) * 100
Thank you.
Hi @Akansha2025,
Create Base Measures
Total Sales
[Total Sales] = SUM(table1[Sales])
Max Visits per Group (used later)
[Max Visits] = MAX(table1[Visits])
Next Create Matrix Visual
Rows: Region, Year, Month
Values:[Total Sales], [Visits], Custom % Measure
Create Percentage Measure
This measure calculates the correct percentage for each row, but the total will be incorrect:
[Sales per Max Visit] =
DIVIDE(SUM(table1[Sales]), MAX(table1[Visits])) * 100
At the total level, MAX does not preserve context, causing the total to be inaccurate.
Use SUMX Over a Grouped Table
Weighted Calculation (Total Sales / Total Max Visits)[Corrected Measure Weighted] =
VAR SummaryTable =
SUMMARIZE(
table1,
table1[Region],
table1[Year],
table1[Month],
"Sales", SUM(table1[Sales]),
"MaxVisit", MAX(table1[Visits])
)
RETURN
DIVIDE(
SUMX(SummaryTable, [Sales]),
SUMX(SummaryTable, [MaxVisit])
) * 100
Thank you.
Hi @Akansha2025,
We wanted to follow up since we haven't heard back from you regarding our last response. We hope your issue has been resolved.
Thank you.
Hi @Akansha2025,
Just checking in -- have you had a chance to review and try the provided solution? Kindly share the status whenever you get a chance.
Thank you.
Hi @Akansha2025,
Thank you so much @MohamedFowzan1, @Hakuna_matata, @Ashish_Mathur, @rohit1991 for your responses regarding the issue.
We’re pleased to know that your query has been resolved. If the solution provided by the community member resolved your concern, please confirm.
Should you have any additional questions or require further assistance, feel free to reach out.
Thank you for your continued cooperation.
Hi @Akansha2025
In place of ID use the SalesPerson
Based on the screenshot you have provided, it looks like you are asking to use sum of orders instead of sales
Please clarify if the understanding or expectation is not the same. Use *100 or change format of measure to % as necessary
Found this useful? 💡 Give a Kudo and mark as solution to guide others.
Hi @Akansha2025
I believe the DAX is calculating:
Total Sales / MAX(Visits across all rows)
I would suggest we improve our DAX by replacing it with
Sales per 100 Visits =
VAR TotalSales = SUM(table1[Sales])
VAR TotalVisits = SUM(table1[Visits])
RETURN DIVIDE(TotalSales, TotalVisits) * 100
This will help us get the desired result as Sales = 468, Visits = 2497 → (468 / 2497) * 100 = 18.74% at the Region-Year-Month total level.
If this helps please mark it as a solution. ^_^
Hello , this is giving me an error ,in DAX.
Hi,
Share the download link of the PBI file and show the expected result there.
Hi @Akansha2025
Could you please try below measure formula
% Sales per 100 Visits :=
IF(
ISINSCOPE(table1[Salesperson]),
DIVIDE(SUM(table1[Sales]), MAX(table1[Visits])) * 100,
DIVIDE(SUM(table1[Sales]), SUM(table1[Visits])) * 100
)
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 39 | |
| 38 | |
| 38 | |
| 28 | |
| 27 |
| User | Count |
|---|---|
| 124 | |
| 88 | |
| 73 | |
| 66 | |
| 65 |