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

Get inspired! Check out the entries from the Power BI DataViz World Championships preliminary rounds and give kudos to your favorites. View the vizzies.

Reply
anwargabr
Helper I
Helper I

Issues with Calendar DAX

Dears ,

 

I tried to creat Time Intelligence Slicer, the same one in theis video
https://youtu.be/AdLDYohLeJc

But I stuck with this message.
The start date or end date in Calendar function can not be Blank value.

BI.JPG

 

 

1 ACCEPTED SOLUTION
anwargabr
Helper I
Helper I

Guys, Thanks

 

The problem was coming from calendar table as the max date was in last year.

Thanks

View solution in original post

9 REPLIES 9
anwargabr
Helper I
Helper I

Guys, Thanks

 

The problem was coming from calendar table as the max date was in last year.

Thanks

Can you explain how your solved this issue? I'm having the exact same one and can't find the solution oyu mentioned here

v-xulin-mstf
Community Support
Community Support

Hi @anwargabr,

 

Sorry, i can not see your share.

Is your issue solved?

 

Best Regards,

Link

BA_Pete
Super User
Super User

Hi @anwargabr ,

 

Have you tried putting this measure into a card and changing the RETURNed variable to each of your declared variables in turn to see which, if any, return blank?

 

Pete



Now accepting Kudos! If my post helped you, why not give it a thumbs-up?

Proud to be a Datanaut!




Thanks for your answer, actually it's a mesure to create a table, so it can't be card

@anwargabr ,

 

It looks like all of your declared variables (todaydate, YearStart etc.) all evaluate to scalar values. Therefore, you can display each of these in a card if you change the variable after your RETURN statement to each of these variables in turn, as suggested.

 

BA_Pete_0-1615802758622.png

Change this "result" variable to "todaydate" and put the measure in a card. See if it returns blank. Then change it to "YearStart" and so on. You will then be able to identify if one of your variables is causing the problem within your "Result" variable calculation.

 

Pete



Now accepting Kudos! If my post helped you, why not give it a thumbs-up?

Proud to be a Datanaut!




I chnaged to a measure and followed your advise, Yearstart, Monthstart and Quarterstart gives blank, only todaydate is give me value.

@anwargabr 

 

Ok. I think there may be a few issues at play here.

 

1) the STARTOFYEAR() function outputs a table, not a scalar value

2) I'm unclear whether your [Month Year] field contains date values

3) I'm unclear what your variables are meant to achieve i.e. what year (calendar or financial) you are trying to align the first date to

 

Are you able to share your Dynamic P&L table data at all, at least a small sample of it? Please remove any sensitive data.

 

Pete



Now accepting Kudos! If my post helped you, why not give it a thumbs-up?

Proud to be a Datanaut!




Yes, I can share.

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

FebPBI_Carousel

Power BI Monthly Update - February 2025

Check out the February 2025 Power BI update to learn about new features.

Feb2025 NL Carousel

Fabric Community Update - February 2025

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

Top Kudoed Authors