Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Please try
NewTable =
SUMMARIZE (
FILTER (
'CBW',
'CBW'[Worked] = -1
&& 'CBW'[Department]
IN { "A", "B", "C" }
&& 'CBW'[Shift Status] IN { "1", "2", "3" }
),
'CBW'[ID],
'CBW'[UnitID],
"ColumnA", SUM ( 'CBW'[Hours Worked] ),
"ColumnB", SUM ( 'CBW'[Hours Rostered] ),
"ColumnC", SUM ( 'CBW'[Hours Rostered] )
)
When repeating code within the same DAX segment, it is recommended to place the repeated code inside a variable and then call that variable as needed.
VAR CommonFilter =
FILTER(
'CBW',
'CBW'[Department] IN {"A","B","C"}
&& 'CBW'[Shift Status] IN {"1","2","3"}
)
Regards,
Nathan
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
37 | |
25 | |
19 | |
14 | |
8 |
User | Count |
---|---|
69 | |
48 | |
44 | |
19 | |
15 |