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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Shantanuj
Frequent Visitor

Equivalent of tableau Function: Lookup and ZN

Dear all,

I am using the following tableau formula:

 

zn(LOOKUP(SUM([Backlog]),0))

 

I need to convert this formula in power bi.

Thanks in advance for help

1 ACCEPTED SOLUTION
ribisht17
Super User
Super User

@Shantanuj 

 

 

https://www.sqlbi.com/articles/how-to-return-0-instead-of-blank-in-dax/  (if below wont work)

Sol=
IF (
    CALCULATE ( SUM ( Backlog) ) = BLANK (),
    0,
    CALCULATE ( SUM ( Backlog) )
)

Regards,
Ritesh

 

Since I have experience with Tableau, I suppose neither technique will necessarily work. In essence, there is a difference between BLANK and Nothing, therefore utilising the LOOKUP function is necessary because there is nothing there.

 

I see this option for that one,

 

https://devoworx.net/how-to-show-zero-values-in-power-bi-chart/

 

Watch my Linkedin Post Post | Feed | LinkedIn

BEFORE

ribisht17_0-1684077631862.png

 

STEP 1

You need to create a separate table for Ship Mode

ribisht17_2-1684045178043.png

STEP 2

 

ribisht17_1-1684045143516.png

 

STEP 3

New Sales Relationship = CALCULATE(sum(Orders[Sales])+0)

ribisht17_0-1684045111147.png

 

 

Mark my post as a solution if it helped you| Munde and Kudis (Ladies and Gentlemen) I like your Kudos!! !!
My YT Channel Dancing With Data !! Connect on Linkedin !!Power BI for Tableau Users 

View solution in original post

6 REPLIES 6
ribisht17
Super User
Super User

Please mark the answer and help the community in return, if it did not help please let us know

 

Regards,

Ritesh

Hi Ribisht,

 

 I am facing an issue after applying below mentioned formula in powerbi. In PowerBI if we set the value as current week and for tableau if we set value as previous week, then required numbers are matching. But when setting both Tableau and PowerBi to point to the current week, numbers are not matching. Can you please suggest what could be the possible issue?

 

Thanks and Regards

Shantanuj

Hi Ribisht,

 Currently, implementing other aspects as well. Once completed if it works, will mark this as a solution. And if it doesn't work will let you know.

 

Thanks and Regards

Shantanuj  

Not a problem, you can watch my video on the same topic as well

 

PL 300 Series Use Case -Null to Zero (DAX) - YouTube

 

Regards,

Ritesh

ribisht17
Super User
Super User

@Shantanuj 

 

 

https://www.sqlbi.com/articles/how-to-return-0-instead-of-blank-in-dax/  (if below wont work)

Sol=
IF (
    CALCULATE ( SUM ( Backlog) ) = BLANK (),
    0,
    CALCULATE ( SUM ( Backlog) )
)

Regards,
Ritesh

 

Since I have experience with Tableau, I suppose neither technique will necessarily work. In essence, there is a difference between BLANK and Nothing, therefore utilising the LOOKUP function is necessary because there is nothing there.

 

I see this option for that one,

 

https://devoworx.net/how-to-show-zero-values-in-power-bi-chart/

 

Watch my Linkedin Post Post | Feed | LinkedIn

BEFORE

ribisht17_0-1684077631862.png

 

STEP 1

You need to create a separate table for Ship Mode

ribisht17_2-1684045178043.png

STEP 2

 

ribisht17_1-1684045143516.png

 

STEP 3

New Sales Relationship = CALCULATE(sum(Orders[Sales])+0)

ribisht17_0-1684045111147.png

 

 

Mark my post as a solution if it helped you| Munde and Kudis (Ladies and Gentlemen) I like your Kudos!! !!
My YT Channel Dancing With Data !! Connect on Linkedin !!Power BI for Tableau Users 
Ritaf1983
Super User
Super User

Hi @Shantanuj 

Could you please attach a sample PBIX file/table that can be copied (no screenshot) and your desired results?

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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