Forum Discussion

AlvinLy's avatar
AlvinLy
Icon for Helper II rankHelper II
2 years ago
Solved

How to reference a column in a Power BI Measure

Hello Microsoft Community,   It feels like the more I learn about Power BI and DAX, the less I actually know.    I've been working with measures recently since one of our Power BI model reference...
  • Anonymous's avatar
    Anonymous
    2 years ago

    Hi amitchandak ,thanks for the quick reply, I'll add further.

    Hi AlvinLy ,

    Regarding your question, please modify your dax expression.

     

    End Period Date = 
    VAR _a = SELECTEDVALUE(FactTable[Schedule Date])
    RETURN  IF(ISBLANK(_a),BLANK(),MINX(FILTER('DateTable','DateTable'[Date] >= _a),[Date]))

     

    This is my understanding: the schedule time for 'Sleep' is filtered by the slicer to null. later you use it as a condition for filtering the date table, and since it's null, it doesn't filter any data. So it returns the smallest date in the date table. As long as the result of the measure is not null, it will not be automatically omitted by Power BI.