The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Unlike Excel, Dax NETWORKDAYS requires weekend parameter.
This is my workaround but it always takes 10 seconds when I touch this calculated columns although the elements in 'holidays lists' table is about the same.
VAR holidays_count = COUNTROWS(FILTER('holidays lists', 'holidays lists'[date] >= table[start Date] && 'holidays lists'[date] <= end Date))
Any better way to do it ? Thank you in advance.
Solved! Go to Solution.
Hi @Maru ,
You can try formula like below:
HolidaysCount =
IF (
CALCULATE (
COUNTROWS ( 'holidays lists' ),
FILTER (
'holidays lists',
'holidays lists'[date] >= MAX ( YourTable[Start Date] )
&& 'holidays lists'[date] <= MAX ( YourTable[End Date] )
)
) > 0,
"holiday",
"no holiday"
)
Best Regards,
Adamk Kong
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Hi @Maru ,
You can try formula like below:
HolidaysCount =
IF (
CALCULATE (
COUNTROWS ( 'holidays lists' ),
FILTER (
'holidays lists',
'holidays lists'[date] >= MAX ( YourTable[Start Date] )
&& 'holidays lists'[date] <= MAX ( YourTable[End Date] )
)
) > 0,
"holiday",
"no holiday"
)
Best Regards,
Adamk Kong
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
@Maru You can try this logic.
holidays_count =
CALCULATE(
COUNTROWS('holidays lists'),
TREATAS(
VALUES('holidays lists'[date]),
'table'[start Date],
'table'[end Date]
)
)
User | Count |
---|---|
27 | |
12 | |
8 | |
8 | |
5 |
User | Count |
---|---|
31 | |
15 | |
12 | |
9 | |
7 |