Forum Discussion
adam12asu
6 years agoRegular Visitor
Trimming text or date in time: Powershell API dataset
Using PowerBI for the first time... I am using a Powershell script to retrieve date & time, text, and numerical values. For reporting I wanted to remove the time from the date and time value. Whi...
- 6 years ago
Hi, adam12asu
Based on your description, I created data to reproduce your scenario.
Table:
You may create two measures as follows.
testurlMeasure = var x = MAX('Table'[test_url]) return IF( LEFT(x,11) = "https://www", RIGHT(x,LEN(x)-LEN(LEFT(x,11))) ) reportdateMeasure = var _currentdate = MAX('Table'[report_date]) return MONTH(_currentdate)&"/"&DAY(_currentdate)&"/"&YEAR(_currentdate)Result:
Best Regards
Allan
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
amitchandak
6 years agoSuper User
In Datatype choose Date and in Format choose the required format
adam12asu
6 years agoRegular Visitor
amitchandak Thanks, but I am unable to select any of the Modeling values.