Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
Hello,
I have 2 tables with dates, they are M to 1 linked. The first table has a bunch of serial number that are produced on that day.
In the second table I have the shift schedule (1/2 shifts).
Out of this I want to find the production count per shift. Is there a simple way to do a count over the serial numbers and divide it between the number that is in the second table [Amount] in the corresponding date?
Solved! Go to Solution.
Hi @Nigel92 -create a calculated column in the production table to divide the production count by the shift amount for the corresponding date
calculated columns:
ProductionCountPerShift =
VAR CurrentDate = 'ProductionTable'[Date]
VAR ShiftAmount = RELATED('ShiftSchedule'[Amount])
RETURN DIVIDE(CALCULATE(COUNT('ProductionTable'[SerialNumber]), 'ProductionTable'[Date] = CurrentDate), ShiftAmount)
create measure for production count
TotalProductionCount = COUNT('ProductionTable'[SerialNumber])
another calculation to shift
ProductionCountPerShift =
VAR ShiftAmount = SELECTEDVALUE('ShiftSchedule'[Amount])
RETURN DIVIDE([TotalProductionCount], ShiftAmount)
Hope it works.
Did I answer your question? Mark my post as a solution! This will help others on the forum!
Appreciate your Kudos!!
Proud to be a Super User! | |
Hi @Nigel92 -create a calculated column in the production table to divide the production count by the shift amount for the corresponding date
calculated columns:
ProductionCountPerShift =
VAR CurrentDate = 'ProductionTable'[Date]
VAR ShiftAmount = RELATED('ShiftSchedule'[Amount])
RETURN DIVIDE(CALCULATE(COUNT('ProductionTable'[SerialNumber]), 'ProductionTable'[Date] = CurrentDate), ShiftAmount)
create measure for production count
TotalProductionCount = COUNT('ProductionTable'[SerialNumber])
another calculation to shift
ProductionCountPerShift =
VAR ShiftAmount = SELECTEDVALUE('ShiftSchedule'[Amount])
RETURN DIVIDE([TotalProductionCount], ShiftAmount)
Hope it works.
Did I answer your question? Mark my post as a solution! This will help others on the forum!
Appreciate your Kudos!!
Proud to be a Super User! | |
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
131 | |
80 | |
53 | |
38 | |
35 |
User | Count |
---|---|
207 | |
82 | |
75 | |
55 | |
50 |