Forum Discussion
Time + 6 hours
- 7 years ago
Why not add the column in Query Editor instead of in DAX?
Add Custom Column:
[TimeColumn] + #duration(0,6,0,0)
Could you check if the below one is helpful
https://community.powerbi.com/t5/Desktop/Convert-UTC-to-local-time-zone-in-DAX/td-p/43328
Hi,
Get this error when I try it as new measure.
So no, doens't work.
The syntax for '.1' is incorrect. (DAX(FORMAT('EZproxy log'[Tijd VS],"MM/dd/YYYY") & " " & REPLACE(FORMAT('EZproxy log'[Tijd VS],"HH:mm:ss").1.2,HOUR('EZproxy log'[Tijd VS])+6))).
- Baskar7 years ago
Resident Rockstar
- Anonymous7 years agoNot applicable
Hi Baskar,
I used Tijd = 'EZproxy log'[Tijd_VS] + TIME(6,0,0) as a new column and got this error: The syntax for '.0' is incorrect. (DAX('EZproxy log'[Tijd_VS] + TIME(6.0.0))).- v-danhe-msft7 years ago
Microsoft Employee
Hi Anonymous,
You could try this formula:
Measure = CALCULATE(SUM(Table1[Tijd VS]))+6/24
Result:
You could also download the pbix fiel to have a view.
Regards,
Daniel He
- Anonymous7 years agoNot applicable
It does work if you replace the , by ;
However it also introduces a new problem.
If I want to change anything in an existing column via edit queries I get an error back that there are more columns than expected.
- Chihiro7 years ago
Solution Sage
Why not add the column in Query Editor instead of in DAX?
Add Custom Column:
[TimeColumn] + #duration(0,6,0,0)
- vishnurk7 years agoFrequent Visitor
Hi,
Could you use it as a calculated column instead of measure,like below
- Anonymous7 years agoNot applicable
Hi vishnurk,
I added a calculated column with: Tijd = FORMAT('EZproxy log'[Tijd_VS];"MM/dd/YYYY") & " " & REPLACE(FORMAT('EZproxy log'[Tijd_VS];"HH:mm:ss"),1,2;HOUR('EZproxy log'[Tijd_VS])+6)
And got this error: The syntax for '.1' is incorrect. (DAX(FORMAT('EZproxy log'[Tijd_VS],"MM/dd/YYYY") & " " & REPLACE(FORMAT('EZproxy log'[Tijd_VS],"HH:mm:ss").1.2,HOUR('EZproxy log'[Tijd_VS])+6))).