cancel
Showing results for
Did you mean:

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

Helper V

## DateTrunc in power BI

I am converting the tableau functions to Power BI.

I am having doubts in this

How do I convert this to power DAX

For Example: if the  Calender day is 12/4/2022, after dateadd('month',1,{Calender day]) the month gets added by 1. So the answer is "12/5/2022" then  datetrunced by month "1/5/2022". For dateadd the date is substracted by -1. So the final answer is 30/4/2022.

How do I achieve this in power BI?

1 ACCEPTED SOLUTION
Super User

@asdf1608  in power bi End of Month Dax function

End Date = ENDOFMONTH('Date'[Date])

2 REPLIES 2
Super User

@asdf1608  in power bi End of Month Dax function

End Date = ENDOFMONTH('Date'[Date])

Super User

For this use case you want EOMONTH([Calendar day],0).

As a more general example you can build dates like

``DATE( YEAR([Calendar date]), MONTH([Calendar date]) + 1, DAY([Calendar date]))``