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.
Hi Experts
How would you write a measure to return the number of WorkingDaysPassed for Oct 18 from the table shown. I want to add the measure to a matrix table..
Solved! Go to Solution.
Hi @Anonymous,
You can try to use below measure to calculate remain working day based on today function and table date column:
Remain Working days = IF ( TODAY () > ENDOFMONTH ( 'Sample'[Date] ), 0, IF ( FORMAT ( TODAY (), "mm/yyyy" ) = FORMAT ( ENDOFMONTH ( 'Sample'[Date] ), "mm/yyyy" ), COUNTROWS ( FILTER ( CALENDAR ( TODAY (), ENDOFMONTH ( 'Sample'[Date] ) ), NOT ( WEEKDAY ( [Date], 1 ) IN { 1, 7 } ) ) ), COUNTROWS ( FILTER ( CALENDAR ( STARTOFMONTH ( 'Sample'[Date] ), ENDOFMONTH ( 'Sample'[Date] ) ), NOT ( WEEKDAY ( [Date], 1 ) IN { 1, 7 } ) ) ) ) )
Regards,
Xiaoxin Sheng
Hi @Anonymous,
You can try to use below measure to calculate remain working day based on today function and table date column:
Remain Working days = IF ( TODAY () > ENDOFMONTH ( 'Sample'[Date] ), 0, IF ( FORMAT ( TODAY (), "mm/yyyy" ) = FORMAT ( ENDOFMONTH ( 'Sample'[Date] ), "mm/yyyy" ), COUNTROWS ( FILTER ( CALENDAR ( TODAY (), ENDOFMONTH ( 'Sample'[Date] ) ), NOT ( WEEKDAY ( [Date], 1 ) IN { 1, 7 } ) ) ), COUNTROWS ( FILTER ( CALENDAR ( STARTOFMONTH ( 'Sample'[Date] ), ENDOFMONTH ( 'Sample'[Date] ) ), NOT ( WEEKDAY ( [Date], 1 ) IN { 1, 7 } ) ) ) ) )
Regards,
Xiaoxin Sheng
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 |
---|---|
113 | |
99 | |
80 | |
70 | |
60 |
User | Count |
---|---|
149 | |
114 | |
107 | |
89 | |
67 |