Forum Discussion
IghorFerreira
1 year agoNew Member
Count Rows From 2 Different Fact Tables Based in Date
Hello, everyone! It's my first post here, sorry if there's anything wrong in the request. I need to count the total amount of preventive work orders executed by machine and date in one table, but...
- 1 year ago
Would the following measures help?
Scheduled = CALCULATE( COUNTROWS( 'Schedule' ), 'Schedule'[Data] IN VALUES( 'Date'[Date] ) ) Completed = CALCULATE( DISTINCTCOUNT( 'WorkOrders'[Machine] ), 'WorkOrders'[Date] IN VALUES( 'Schedule'[Data] ) ) Compliance % = DIVIDE( [Completed], [Scheduled] )Let me know if you have any questions.
gmsamborn
1 year agoSuper User
Would the following measures help?
Scheduled =
CALCULATE(
COUNTROWS( 'Schedule' ),
'Schedule'[Data] IN VALUES( 'Date'[Date] )
)
Completed =
CALCULATE(
DISTINCTCOUNT( 'WorkOrders'[Machine] ),
'WorkOrders'[Date] IN VALUES( 'Schedule'[Data] )
)
Compliance % =
DIVIDE(
[Completed],
[Scheduled]
)
Let me know if you have any questions.