Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
Hi,
I have a start & end date with some blanks in the rows which I would like included, I need to handle them differently in the visual layer. However the DAX calendar function says blanks are not allowed.
I tried adding a IF(ISBLANK()) but this returns a error saying end date must be larger than start date, so I'm out of ideas now.
Delivery Days =
COUNTROWS (
FILTER (
ADDCOLUMNS (
CALENDAR (
'Toll_Shipments'[Pick Up Date],
Toll_Shipments[Actual Delivered Date]
),
"Is Weekday",WEEKDAY([date],2)<6
,"Is Holiday", CONTAINS('Holiday Dates','Holiday Dates'[Dates],[Date] )
),
[Is Holiday] = FALSE()
&& [Is Weekday] = TRUE()
)
)
Thanks for any ideas or assistance.
Solved! Go to Solution.
@ringovski , Try like
Work Day = if( not(isblank([Pick Up Date])) && not(isblank([Actual Delivered Date])) , COUNTROWS(FILTER(ADDCOLUMNS(CALENDAR(Table[Pick Up Date],Table[Actual Delivered Date]),"WorkDay", if(WEEKDAY([Date],2) <6,1,0)),[WorkDay] =1)), blank())
@ringovski , Try like
Work Day = if( not(isblank([Pick Up Date])) && not(isblank([Actual Delivered Date])) , COUNTROWS(FILTER(ADDCOLUMNS(CALENDAR(Table[Pick Up Date],Table[Actual Delivered Date]),"WorkDay", if(WEEKDAY([Date],2) <6,1,0)),[WorkDay] =1)), blank())
Thanks for reply should have thought that myself.
Does the code fixed your problem? I come across to have error using the code above.
Appreciate your help
User | Count |
---|---|
40 | |
26 | |
22 | |
16 | |
15 |
User | Count |
---|---|
54 | |
35 | |
18 | |
17 | |
15 |