Forum Discussion
Dynamic Allocation from different table
- 1 year ago
Anonymous
Make sure there is a relationship between the 'Division' columns in both tables.
Calculate the monthly target for each rep by dividing the division's monthly target by the number of active reps in that division for each month.
DAX
Mo Target =
VAR ActiveReps =
CALCULATE(
DISTINCTCOUNT('opportunity'[Rep]),
ALLEXCEPT('opportunity', 'opportunity'[Division], 'opportunity'[Closed Date])
)
RETURN
DIVIDE(
MAX('target'[Div_Mo_Target]),
ActiveReps,
0
)Calculate the number of opportunities closed by each rep for each month.
DAX
Jan-25 =
CALCULATE(
COUNT('opportunity'[Opportunity]),
MONTH('opportunity'[Closed Date]) = 1,
YEAR('opportunity'[Closed Date]) = 2025
)Feb-25 =
CALCULATE(
COUNT('opportunity'[Opportunity]),
MONTH('opportunity'[Closed Date]) = 2,
YEAR('opportunity'[Closed Date]) = 2025
)Add a Matrix visual to your report.
Drag 'Division' and 'Rep' to the Rows.
Drag the measures 'Mo Target', 'Jan-25', and 'Feb-25' to the Values.
Ensure that the matrix is set to show subtotals and grand totals.
Hi Anonymous,
Thank you for reaching out in Microsoft Community Forum.
Thank you bhanu_gautam for the helpful response.
As suggested by bhanu_gautam, I hope this information was helpful. Please let me know if you have any further questions or you'd like to discuss this further. If this answers your question, please "Accept as Solution" and give it a 'Kudos' so others can find it easily.
Please continue using Microsoft community forum.
Regards,
Pavan.