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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

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
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

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