Returning the first result of an table

Viewed 49

I'm struggling within DAX to find a formula to return the first result. My table is as folllows:

TABLE

The unique column is Dim_B_ID. So what I really would like to have is to return the first result of Amount ONLY for Dim_B_ID where the column IN is not blank. Im struggling cause I get answers like 3500 (total of the rows) and I can't seem to integrate IF(NOT(ISBLANK( funtion into this. So if someone has a solution for me, I would really appreciate it as I'm not so much of an expert in DAX.

1 Answers

You could try using the following measure:

FirstNonBlank =
    FIRSTNONBLANKVALUE(
        'Table'[Dim_Date_ID],
        SUM( 'Table'[IN] )
    )

When put together with Dim_B_ID in a table for example you could visualize FirstNonBlank for every "categorie" like so:

Results from measure

Used slightly modified sample data here:

enter image description here

Related