Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
FILIPKACZMAR
Advocate I
Advocate I

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 2
FILIPKACZMAR
Advocate I
Advocate I

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)?

pmay
Resolver I
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.

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.