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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

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
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.