Forum Discussion

hackfifi's avatar
hackfifi
Helper V
5 years ago
Solved

Return Value from Table based on Measure Condition

Hi - I am trying to return the column value "Month" based on Measure (% Complete) In the example below, i would like to return the "MONTH" when a "Project" reaches 10% and 90% Hence in the example ...
  • mahoneypat's avatar
    mahoneypat
    5 years ago

    I did think it was a column.  Here is a different expresssion that works with a measure.  Just replace 0.1 with 0.9 for the other measure.

     

    10 Pct Month =
    VAR summary =
        ADDCOLUMNS (
            SUMMARIZE (
                Data,
                Data[Project],
                Data[Location],
                Data[Month]
            ),
            "@PctComplete", [% Complete Measure]
        )
    RETURN
        MINX (
            FILTER (
                summary,
                [@PctComplete] >= 0.1
            ),
            Data[Month]
        )

     

    Regards,

    Pat