Forum Discussion
Anonymous
4 years agoNot applicable
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])
- Anonymous4 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 " & _maxdateBest Regards
2 Replies
- AnonymousNot 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 " & _maxdateBest Regards
- amitchandak
Super User
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])