Forum Discussion

Pikachu-Power's avatar
Pikachu-Power
Impactful Individual
6 years ago
Solved

Simple Measure Replace Today() with Date_Create

Hi All,
 
I have the following Measure in a line chart:
 
Measure = CALCULATE(COUNT(Table[PNR]), Table[Due_Date]<TODAY())
 
 
In the line Chart I have to replace TODAY() with Date_Create to get history instead of the todays value.
Date_Create is connectid with Calender[Date]. What would be the right expression?
I tried MAX() and SELECTEDVALUE() but dont work.
  • v-easonf-msft's avatar
    v-easonf-msft
    6 years ago

    Hi , Pikachu-Power 

    Could you please tell me whether your problem has been solved?
    If it is,  please mark your reply as Answered to close this thread.

    It will help other community members easily find the solution when they get the similar issue.

     

    Best Regards,
    Community Support Team _ Eason

3 Replies

  • Pikachu-Power , Not very clear.

    Try like

    Measure = CALCULATE(COUNT(Table[PNR]), Table[Due_Date] in allselected(Table[Due_created] ) )

     

    Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.

    • Pikachu-Power's avatar
      Pikachu-Power
      Impactful Individual

      I think I could solve it

       

      VAR Date = MAX(Calender[Date])
      RETURN
      Measure = CALCULATE(COUNT(Table[PNR]), Table[Due_Date] < Date )
       
      And Calender is connected with Table[Due_created].
      • v-easonf-msft's avatar
        v-easonf-msft
        Community Support

        Hi , Pikachu-Power 

        Could you please tell me whether your problem has been solved?
        If it is,  please mark your reply as Answered to close this thread.

        It will help other community members easily find the solution when they get the similar issue.

         

        Best Regards,
        Community Support Team _ Eason