Showing results for 
Search instead for 
Did you mean: 
New Member

Converting Tableau Calculation to PowerBI DAX

Need help to convert the following below tableau calculation into dax


IF [Renewal Date] >= DATE(STR(DATEPART('year',[HighDateValue Max]))+'-'+STR(1)+'-'+STR(1))
AND [Renewal Date] <= DATE(STR(DATEPART('year',[HighDateValue Max]))+'-'+STR(3)+'-'+STR(31)) THEN '1 Jan - 31 Mar'


Renewal Date - date (Datatype)

HighDateValue Max - date (Datatype)


First line - DATE(STR(DATEPART('year',[HighDateValue Max]))+'-'+STR(1)+'-'+STR(1))

Output - 01-01-2016 01-01-2017 01-01-2018 01-01-2019 01-01-2020 01-01-2021 01-01-2022


Second line - DATE(STR(DATEPART('year',[HighDateValue Max]))+'-'+STR(3)+'-'+STR(31))

Output - 31-03-2016 31-03-2017 31-03-2018 31-03-2019 31-03-2020 31-03-2021 31-03-2022


Helper II
Helper II

IF([Renewal Date] >= DATE(YEAR(HighDateValue[Max])+'-'&TEXT(DAY(HighDateValue[Max])+1)+'-'&TEXT(MONTH(HighDateValue[Max])+1))
AND [Renewal Date] <= DATE(YEAR(HighDateValue[Max])+'-'&TEXT(DAY(HighDateValue[Max])+3)+'-'&TEXT(MONTH(HighDateValue[Max])+3)))
THEN "1 Jan - 31 Mar"

Solution Sage
Solution Sage

Hi @Dragpunk ,

For first Line DATE(STR(DATEPART('year',[HighDateValue Max]))+'-'+STR(1)+'-'+STR(1)), you can use below DAX :

DATE(YEAR('Date Data'[HighDateValue Max ].[Date]), "1","1")


For Second Line DATE(STR(DATEPART('year',[HighDateValue Max]))+'-'+STR(1)+'-'+STR(1)), you can use below DAX:

DATE(YEAR('Date Data'[HighDateValue Max ].[Date]), "3","31")


And overall column can have below DAX expression:

DAX Result = IF('Date Data'[Renewal Date ].[Date] >= DATE(YEAR('Date Data'[HighDateValue Max ].[Date]), "1","1") && 'Date Data'[Renewal Date ].[Date] <= DATE(YEAR('Date Data'[HighDateValue Max ].[Date]), "3","31"), "1 Jan - 31 Mar")


This will give you below result for sample renewal date and HighDateValue Max,



If this answer helps, please mark it as an Accepted Solution so it would help others to find the solution.


Inogic Professional Service Division

An expert technical extension for your techno-functional business needs

Power Platform/Dynamics 365 CRM

Drop an email at


Power Platform/Dynamics 365 CRM Tips and Tricks:

Helpful resources

PBI Sept Update Carousel

Power BI September 2023 Update

Take a look at the September 2023 Power BI update to learn more.

Learn Live

Learn Live: Event Series

Join Microsoft Reactor and learn from developers.

Dashboard in a day with date

Exclusive opportunity for Women!

Join us for a free, hands-on Microsoft workshop led by women trainers for women where you will learn how to build a Dashboard in a Day!

MPPC 2023 PBI Carousel

Power Platform Conference-Power BI and Fabric Sessions

Join us Oct 1 - 6 in Las Vegas for the Microsoft Power Platform Conference.

Top Solution Authors
Top Kudoed Authors