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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
JustinDoh1
Post Prodigy
Post Prodigy

Display data from two tables in a Matrix visual

Hi Community,

 

I have posted my Pbix file here.

I am trying to display data from two datasets in a Matrix visual.

 

There is a relationship between two datasets (Actual and Estimate).

Here is a little demo of what I am trying to do.

Currently, the first Matrix are composed of two Matrix.

JustinDoh1_3-1647903402760.png

 

There is a relationship between these two tables using a dim table (BudgetType).

JustinDoh1_1-1647903043160.png

A critical point is two tables have a measure showing as "Actual" or "Estimate".

JustinDoh1_2-1647903187653.png

When this measure is applied into Stacked column chart, it works.

 

The error on Matrix is this:

JustinDoh1_4-1647903537709.png

These are columns for Stacked Column chart, and it works.

JustinDoh1_5-1647903733279.png

These are columns for Matrix, and I am not sure where/how logic for "ActualOrEstimate" could be applied.

JustinDoh1_6-1647903887804.png

 

The expected output is having one Matrix displaying both Actual and Estimated columns.

 

Thanks.

 

 

 

 

1 ACCEPTED SOLUTION
davehus
Memorable Member
Memorable Member

Hi @JustinDoh1 , Me again.. 🙂 Change Values to firstnonblank as below.

 

davehus_0-1647904443608.png

 

View solution in original post

5 REPLIES 5
davehus
Memorable Member
Memorable Member

Hi @JustinDoh1 , Me again.. 🙂 Change Values to firstnonblank as below.

 

davehus_0-1647904443608.png

 

@davehus 

I have two questions regards to using FirstNonBlank.

It appears that this function is fairly new one (if I am not mistaken).

1) What is usage of this function?

2) What does "1" mean for the expression?

JustinDoh1_1-1647994358102.png

Thanks.

Hi @JustinDoh1 , It's used the return the first non blank value in a table. You would typically use it with a measure. So for example if you had a sales table with null values and you wanted to get the first date where there is a value, you could write. FIRSTNONBLANK(Sales[Date],[Sales Measure])

 

The 1 is a way of short circuiting the measure for want of a better word. So when you add the 1 instead of a measure, you are basically asking for the first text value it finds.

So if the first row that is not blank and equals Actual then do this else do that.

 

If you just write FirstNonBlank(Actual[ActualOrEstimated2],1) into a measure and drag it into a visual, you will see what it's doing.

 

HTH,

 

D

@davehus  Looking back to your previous response, I realized that you mentioned about "FirstNonBlank" on the post, but the Pbix file had the "Value".

Sorry. I might bypassed the details and just jumped into the Pbix file you have shared.

Anyway, I am learning new stuffs. Thanks!

@davehus 

You Rock!

Thank you so much!

How do you know all this stuffs?

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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