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

Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now

Reply
subhendude
Microsoft Employee
Microsoft Employee

Snow non-blank latest row data in a matrix table

I have a dataset containing machine inventory details, including owner information and power consumption. When a machine stops, the owner field is left blank, and power consumption is set to zero. For instance, Machine 4 stopped on May 2nd, which is why its owner field is blank and its consumption is zero. Similarly, Machine 5 stopped on May 3rd, resulting in a blank owner field and zero consumption.

subhendude_0-1715973522123.png

When I plot the data in a matrix, the owner field is repeated twice for Machine 4 and Machine 5, likely due to two variations in the owner data.

subhendude_1-1715973558475.png

I would like to display the most recent non-blank owner information for these machines in the Owner field. For instance, Machine 4 should show Owner4, and Machine 5 should show Owner5 like below

subhendude_2-1715973584769.png

Can anyone sugesst how to show this? Any help is really appreciated.

 

Thanks!

 

 

1 ACCEPTED SOLUTION
Ritaf1983
Super User
Super User

Hi @subhendude 
Maybe it is not the most elegant way, but it works 🙂

You can create 2 calculated columns :

1. For last nonblank date for every machine :

LastNonBlankDate =
VAR CurrentMachine = [Machine]
VAR CurrentDate = [Date]
RETURN
    CALCULATE(
        MAX('Table'[Date]),
        FILTER(
            'Table',
            'Table'[Machine] = CurrentMachine &&
            'Table'[Owner] <> BLANK() &&
            'Table'[Consumption] > 0 &&
            'Table'[Date] <= CurrentDate
        )
    )

2. For the owner in this date

LastOwnerOnDate =
VAR CurrentMachine = [Machine]
VAR LastNonBlankDate = [LastNonBlankDate]
RETURN
    CALCULATE(
        MAX('Table'[Owner]),
        FILTER(
            'Table',
            'Table'[Machine] = CurrentMachine &&
            'Table'[Date] = LastNonBlankDate
        )
    )
Ritaf1983_0-1716018536657.png

Now, you can use the calculated owner in your visuals:

Ritaf1983_1-1716018630269.png

The pbix is attached

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

 

 

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile

View solution in original post

2 REPLIES 2
Ashish_Mathur
Super User
Super User

Hi,

In the Query Editor, use the "Fill down" feature on the Owner column


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
Ritaf1983
Super User
Super User

Hi @subhendude 
Maybe it is not the most elegant way, but it works 🙂

You can create 2 calculated columns :

1. For last nonblank date for every machine :

LastNonBlankDate =
VAR CurrentMachine = [Machine]
VAR CurrentDate = [Date]
RETURN
    CALCULATE(
        MAX('Table'[Date]),
        FILTER(
            'Table',
            'Table'[Machine] = CurrentMachine &&
            'Table'[Owner] <> BLANK() &&
            'Table'[Consumption] > 0 &&
            'Table'[Date] <= CurrentDate
        )
    )

2. For the owner in this date

LastOwnerOnDate =
VAR CurrentMachine = [Machine]
VAR LastNonBlankDate = [LastNonBlankDate]
RETURN
    CALCULATE(
        MAX('Table'[Owner]),
        FILTER(
            'Table',
            'Table'[Machine] = CurrentMachine &&
            'Table'[Date] = LastNonBlankDate
        )
    )
Ritaf1983_0-1716018536657.png

Now, you can use the calculated owner in your visuals:

Ritaf1983_1-1716018630269.png

The pbix is attached

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

 

 

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

February Power BI Update Carousel

Power BI Monthly Update - February 2026

Check out the February 2026 Power BI update to learn about new features.