Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

Selecting the time passed from a date

I´m getting asked a weird requisite. We have a database containing customer who are in debt. Each row is a different customer, and each customer has a paying deadline, in a date column. I´m getting a...
  • v-angzheng-msft's avatar
    v-angzheng-msft
    4 years ago

    Hi, Anonymous 

    Create a calendar table and use the date of the calendar table as a slicer. And control the slicer to single selection.

    Then to create a measure as follows:

    Measure 3 = 
    var _datediff=DATEDIFF(MAX('Table'[Date]),SELECTEDVALUE('calendar'[Date]),DAY)
    var _if=IF(HASONEVALUE('calendar'[Date]),_datediff,"Only one date can be required")
    
    return _if

    Result:



    Please refer to the attachment below for details. Hope this helps.

     

     

     

    Best Regards,
    Community Support Team _ Zeon Zheng


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