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

To convert tableau calculation to PBI DAX

I need to convert the tableau calculation to PBI Dax

if DATETRUNC('week', [Date1) < DATETRUNC('week', [Date2])
then 0
else zn([column1])+zn([Column2]
)

asdf1608_1-1681811319823.png

if ActualDate is less than delivered date then 0 else the sum should come.

I tried the same concept in power BI

a = if(

(Append1[actualDate]- WEEKDAY(Append1[actual Date] , 2) +1).day<
(Append1[delivered Date]- WEEKDAY(Append1[deliveredDate] , 2) +1).day,0,valiue+calculation1)
 
But the result is wrong.
Have attached the file here
Help in this is needed.
 
Thanks in advance

 

1 ACCEPTED SOLUTION

3 REPLIES 3
lbendlin
Super User
Super User

Don't use the .[day] hierarchy item.

 

calculated1 = IF(Sheet1[week1]<Sheet1[Week2],0,Sheet1[Valiue])

@lbendlin Can you show me how throught the power BI file. I tried the same yet the result seems to be wrong.

sample.pbix

Help is really appreciated.

 

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!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

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