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

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.

Reply
DivakarKrishnan
Helper II
Helper II

Default value assistance in DAX

Dear Team,

 

I have written following DAX to show our YTD closing balances in card visuals. When i am choosing months in slicer i am getting the values correctly. However, if i am not choosing any months in slicer, card visual is showing as "Blank".

 

 

DAX:

Closing Collection YTD = CALCULATE([Closing Balance], DATESYTD('Calendar'[Date]) )
 

I would like to populate current month (september balance) as the default one when no month choosen. How to achieve this in DAX. Please guide me.

 
1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@DivakarKrishnan ,when you do not choose any month in the slicer , the last date for datesytd is the end date of your calendar. So if you do not have future data in any of your tables. Stop your calendar at today.

otherwise, you have to choose a month or date

 

refer Power BI — YTD -FAQ
https://medium.com/@amitchandak.1978/power-bi-ytd-questions-time-intelligence-1-5-e3174b39f38a

 

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

2 REPLIES 2
amitchandak
Super User
Super User

@DivakarKrishnan ,when you do not choose any month in the slicer , the last date for datesytd is the end date of your calendar. So if you do not have future data in any of your tables. Stop your calendar at today.

otherwise, you have to choose a month or date

 

refer Power BI — YTD -FAQ
https://medium.com/@amitchandak.1978/power-bi-ytd-questions-time-intelligence-1-5-e3174b39f38a

 

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Thank you Amit.. This should be fine.

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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