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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
asdf1608
Helper V
Helper V

Facing problem in converting tableau calculated fields to power BI DAX measures

I am converting the tbleau measures to Power DAX measures. Help in this is needed.

 

1) column1 = DATEADD('hour',-6,[column2])

 

2)column3=

IF DATEPART('weekday',DATEADD('month',10,DATETRUNC('year',[[column1]))) = 1

THEN DATEADD('day',0,DATEADD('hour',2,DATEADD('month',10,DATETRUNC('year',[column1]))))

ELSE DATEADD('day',8-DATEPART('weekday',DATEADD('month',10,DATETRUNC('year',[column1]))),
DATEADD('hour',2,DATEADD('month',10,DATETRUNC('year',[column1]))))

END

 this is urgent.

Please Help.

 

Thanks in advance

3 REPLIES 3
lbendlin
Super User
Super User

Can you describe the business problem behind the formula?

@lbendlin  basically I need the datetrunc part.

In tableau datetrunc(year,column1)

For example if the date is 12/3/2021 after datetrunc if results "1/1/2021"

if the date is 3/5/2021 then the result is 1/1/2021

How to achieve this in power BI

DATE(YEAR([column1]),1,1)

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.