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 the Tableau Calculated field to PBI DAX

The Tableau Calculated Field is

if DATETRUNC('week', [Date]) < DATETRUNC('week', Date])


then 0

else zn([column1]) + zn([column1])

 

How do I get Datetrunc in power BI Dax

 

Help in this is needed.

Thanks in advance

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @asdf1608 ,

 

Please try this:

Column =
IF(
    DATEDIFF('week', [Date], [Date].[Date]) < 0,
    0,
    IF(
        ISBLANK([column1]),
        0,
        [column1] + [column1]
    )
)

You may find it helpful to refer to similar posts:

Please convert the below Tableau Expression to Dax... - Microsoft Power BI Community

Replicating Tableau Calculated Formula - Microsoft Power BI Community

 

Best Regards,

Neeko Tang

If this post  helps, then please consider Accept it as the solution  to help the other members find it more quickly. 

View solution in original post

1 REPLY 1
Anonymous
Not applicable

Hi @asdf1608 ,

 

Please try this:

Column =
IF(
    DATEDIFF('week', [Date], [Date].[Date]) < 0,
    0,
    IF(
        ISBLANK([column1]),
        0,
        [column1] + [column1]
    )
)

You may find it helpful to refer to similar posts:

Please convert the below Tableau Expression to Dax... - Microsoft Power BI Community

Replicating Tableau Calculated Formula - Microsoft Power BI Community

 

Best Regards,

Neeko Tang

If this post  helps, then please consider Accept it as the solution  to help the other members find it more quickly. 

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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