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

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.

Reply
eng_123
Frequent Visitor

Dax calculation to include blank rows

Hi All I am trying a dax calculation to below scenario. Seems to work fine for nonblank rows but its excluding the blank rows.

 

CALCULATE (

    MAX ( 'Table'[Product Delivery Status] ),

    FILTER ( 'Table', 'Fact'[Product Delivery Date] = MAX ( 'Fact'[Product Delivery Date] ) )

)

Dataset:

Product

Product Delivery Status

Product Delivery Date

 

Apples

Delivered

10/05/2023 23:08

 

Apples

Delivered

10/05/2023 21:12

 

Strawberry

 

 

 

Pear

 

 

 

Orange

Failed

10/05/2023 21:12

 

Orange

Delivered

10/05/2023 21:12

 

 

Current Result:

ProductProduct Delivery StatusProduct Delivery DateDax Calculation Required
ApplesDelivered10/05/2023 23:08Delivered
OrangeFailed10/05/2023 21:12Failed

 

Desired Result:

 

ProductProduct Delivery StatusProduct Delivery DateDax Calculation Required
ApplesDelivered10/05/2023 23:08Delivered
Strawberry   
Pear   
OrangeFailed10/05/2023 21:12Failed
2 REPLIES 2
FreemanZ
Super User
Super User

you may also try with a calculated table like:

Table = 
ADDCOLUMNS(
    VALUES(data[Product]),
    "Status",
    CALCULATE(MAX(data[Product Delivery Status])),
    "Date",
    CALCULATE(MAX(data[Product Delivery Date]))
)

it worked like:

FreemanZ_1-1683858796549.png

 

FreemanZ
Super User
Super User

hi @eng_123 

not sure if i fully get you, you can plot the table visual directly like:

FreemanZ_0-1683858719447.png

0 code. 

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

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