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,
I wanted to check if you had the opportunity to review the information provided. Please feel free to contact us if you have any further questions. If my response has addressed your query, please "Accept as Solution" and give a 'Kudos' so other members can easily find it.
Thank you,
Pavan.