Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
2 years ago
Solved

Dynamic value in measure

Total = var _nl =" " var _selected = CONCATENATEX(VALUES('Commitment Rundown'[Date]),FORMAT('Commitment Rundown'[Date],"dd-mmm-yy"),_nl) return  CALCULATE(DISTINCTCOUNT('Commitment Rundown'[LTP...
  • Anonymous's avatar
    Anonymous
    2 years ago

    Hi Anonymous ,

    Please try the following DAX formula and check if they can solve the problem:

    Total = 
    VAR _selectedDates = VALUES('Commitment Rundown'[Date])
    RETURN
    CALCULATE(
        DISTINCTCOUNT('Commitment Rundown'[LTP]),
        FILTER(
            'Commitment Rundown',
            'Commitment Rundown'[Baseline Finish WE] IN _selectedDates &&
            'Commitment Rundown'[RFSU Forecast WE] IN _selectedDates
        )
    )

     

    Best Regards,

    Wisdom Wu

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