Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

Measure Show both Date and Time in Text Box

Hi Experts

 

the following measure is showing both date and time in the text box - i only want it to show the selected date Range in the text box... how do i modify the measure

 

Referral Activity Selection = "Date of Referral :" & MIN('Referral Activity'[Date of Referral]) & " to " & MAX('Referral Activity'[Date of Referral])
  • Anonymous's avatar
    Anonymous
    4 years ago

    Hi Anonymous ,

    You can update the formula of measure [Referral Activity Selection] as below and check if it can return your expected result...

    Referral Activity Selection =
    VAR _mindatetime =
        MIN ( 'Referral Activity'[Date of Referral] )
    VAR _maxdatetime =
        MAX ( 'Referral Activity'[Date of Referral] )
    VAR _mindate =
        DATE ( YEAR ( _mindatetime ), MONTH ( _mindatetime ), DAY ( _mindatetime ) )
    VAR _maxdate =
        DATE ( YEAR ( _maxdatetime ), MONTH ( _maxdatetime ), DAY ( _maxdatetime ) )
    RETURN
        "Date of Referral :" & _mindate & " to " & _maxdate

    Best Regards

2 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi Anonymous ,

    You can update the formula of measure [Referral Activity Selection] as below and check if it can return your expected result...

    Referral Activity Selection =
    VAR _mindatetime =
        MIN ( 'Referral Activity'[Date of Referral] )
    VAR _maxdatetime =
        MAX ( 'Referral Activity'[Date of Referral] )
    VAR _mindate =
        DATE ( YEAR ( _mindatetime ), MONTH ( _mindatetime ), DAY ( _mindatetime ) )
    VAR _maxdate =
        DATE ( YEAR ( _maxdatetime ), MONTH ( _maxdatetime ), DAY ( _maxdatetime ) )
    RETURN
        "Date of Referral :" & _mindate & " to " & _maxdate

    Best Regards

  • Anonymous , what is the issue?

     

    Try like

     

    Referral Activity Selection = "Date of Referral :" & MINX(allselected('Referral Activity') , 'Referral Activity'[Date of Referral]) & " to " & MAXX(allselected('Referral Activity') ,'Referral Activity'[Date of Referral])