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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

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
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.