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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Anonymous
Not applicable

len on date field in table

Hi Experts

 

My next Appointmwnt date column in my FACT Table is of the format 25/12/2022 (dd/mm/yyyy) i wan to create a new column in the table where if the date is 25/12 and 01/01 then 1 else zero.

 

what is the dax please

2 ACCEPTED SOLUTIONS
Mikelytics
Resident Rockstar
Resident Rockstar

HI @Anonymous ,

 

I think you mean OR instead of AND right?

 

The formula would be:

Formula = 

IF(
    OR(
        DAY(DimDate[Date]) = 25 && MONTH(DimDate[Date]) = 12,
        DAY(DimDate[Date]) = 1 && MONTH(DimDate[Date]) = 1
    ),
    1,
    0
)

 

Result

Mikelytics_0-1667389818290.png

 

 

Best regards

Michael

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly. Appreciate your kudos.

@ me in replies or I'll lose your thread.

------------------------------------------------------------------
Visit my blog datenhungrig which I recently started with content about business intelligence and Power BI in German and English or follow me on LinkedIn!

View solution in original post

Mikelytics
Resident Rockstar
Resident Rockstar

Aweseome! Thank you for your feedback1 🙂

------------------------------------------------------------------
Visit my blog datenhungrig which I recently started with content about business intelligence and Power BI in German and English or follow me on LinkedIn!

View solution in original post

3 REPLIES 3
Mikelytics
Resident Rockstar
Resident Rockstar

Aweseome! Thank you for your feedback1 🙂

------------------------------------------------------------------
Visit my blog datenhungrig which I recently started with content about business intelligence and Power BI in German and English or follow me on LinkedIn!
Mikelytics
Resident Rockstar
Resident Rockstar

HI @Anonymous ,

 

I think you mean OR instead of AND right?

 

The formula would be:

Formula = 

IF(
    OR(
        DAY(DimDate[Date]) = 25 && MONTH(DimDate[Date]) = 12,
        DAY(DimDate[Date]) = 1 && MONTH(DimDate[Date]) = 1
    ),
    1,
    0
)

 

Result

Mikelytics_0-1667389818290.png

 

 

Best regards

Michael

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly. Appreciate your kudos.

@ me in replies or I'll lose your thread.

------------------------------------------------------------------
Visit my blog datenhungrig which I recently started with content about business intelligence and Power BI in German and English or follow me on LinkedIn!
Anonymous
Not applicable

Excellent thank you for the feedback

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 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.