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
vbourbeau
Resolver II
Resolver II

Replace null value by 0 within a full outer join

Hi

 

look the below image...

I want to get the future stock value. For that I have to add "stock" to future "transaction", it's giving me the balance.

All work great but It's kind of full outer join. I have "stock" without "transaction" and "transaction" without stock. also here it's ok. But how can I replace the blank value with 0???

 

see the source here https://we.tl/t-Tx1aRpTfmY

 

 

Capture.PNG

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @vbourbeau ,

 

Create 3 measures as below:

 

_In = IF(MAX('Stock'[Part]) in FILTERS(Part[Part])||MAX('Transaction'[Part]) in FILTERS(Part[Part]),MAX('Transaction'[In])+0,BLANK())
_Out = IF(MAX('Stock'[Part]) in FILTERS(Part[Part])||MAX('Transaction'[Part]) in FILTERS(Part[Part]),MAX('Transaction'[out])+0,BLANK())
_Qte = IF(MAX('Stock'[Part]) in FILTERS(Part[Part])||MAX('Transaction'[Part]) in FILTERS(Part[Part]),MAX('Stock'[Qte])+0,BLANK())

 

And you will see:

Annotation 2020-06-19 093340.png

For the related .pbix file,pls click here.

 

Best Regards,
Kelly
Did I answer your question? Mark my post as a solution!

View solution in original post

4 REPLIES 4
Anonymous
Not applicable

Hi @vbourbeau ,

 

Create 3 measures as below:

 

_In = IF(MAX('Stock'[Part]) in FILTERS(Part[Part])||MAX('Transaction'[Part]) in FILTERS(Part[Part]),MAX('Transaction'[In])+0,BLANK())
_Out = IF(MAX('Stock'[Part]) in FILTERS(Part[Part])||MAX('Transaction'[Part]) in FILTERS(Part[Part]),MAX('Transaction'[out])+0,BLANK())
_Qte = IF(MAX('Stock'[Part]) in FILTERS(Part[Part])||MAX('Transaction'[Part]) in FILTERS(Part[Part]),MAX('Stock'[Qte])+0,BLANK())

 

And you will see:

Annotation 2020-06-19 093340.png

For the related .pbix file,pls click here.

 

Best Regards,
Kelly
Did I answer your question? Mark my post as a solution!
Anonymous
Not applicable

Create new measures with + 0

_Qte = SUM(Stock[Qte]) + 0
_In = SUM(Trans[In]) + 0
_Out = SUM(Trans[Out]) + 0
You will probably get additional rows, but there will be zeroes!
HTH,
Smitty

yeah I try something like that but I get all the part. In my real life database I have lot of part I don't want to see it there.

Anonymous
Not applicable

Add a Filter to the visual, on Balance > 0 to reduce the extra rows.

HTH,

Smitty 

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.

Top Solution Authors