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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

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
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.