Forum Discussion

FILIPKACZMAR's avatar
FILIPKACZMAR
Advocate I
4 years ago

Calendar function can not be blank

Hello, 

 

my name is Filip/Poland. I am new at Power BI enviroment. 

 

I have to prepare for my company some dashboard raports.

 

I want to calculate days of raporting without weekends.

 

I am using function:

 

=COUNTROWS (
FILTER (
ADDCOLUMNS (
CALENDAR ( 'SQA list'[End of Inspection], 'SQA list'[Delivered Report] ),
"Day of Week", WEEKDAY ( [Date], 2 )
),
[Day of Week] <> 6
&& [Day of Week] <> 7
)
)
 
but all the time I have the same error:
The start date or end date in Calendar function can not be Blank value.
 
How to correct it? I have tried this dax code on different data base and it worked.
 
Thank you for help 🙂

2 Replies

  • pmay's avatar
    pmay
    Resolver I

    What is the relationship between the table used by [End of Inspection] and your calendar table?  It should be a 1 directional, one to many, from Calendar to your data.
    Then build your measure, and one the Filters pane for that visual, drag in the "Day of Week" field from your calendar, select all apart from 6 & 7.  That will do it if your relationship is right.

  • Help you for help 🙂 Can you tell me, why I can use functions like datedif (works with calendar) and cant use functions like calendar (also works with calendar)?