Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi,
Newb here.
I have a column with time stamps in it. I want to replace the time stamp with a text value i.e if the time stamps are between 00:00:00 and equal to 11:59:59 replace with text AM. I want to do the same with PM data.
Please help.
Thanks,
@Anonymous Please try this as a New Column
Flag = IF(HOUR([DateTime])<12,"AM","PM")
Proud to be a PBI Community Champion
Thank you fpr the response. It did not work. Error: The syntax for '"AM"' is incorrect. (DAX(IF(HOUR([creation_time_utc])<12."AM","PM"))).
This is the formula used:
Hi @Anonymous
Based on my test,the formula seems correct.Please show us the error screenshot.
Regards,
Cherie
Hi @v-cherch-msft ,
Here is a full screen print of the table. I have checked that my format settings are right on the creation time column. Am I missing something maybe format wise
Hi @Anonymous
It is strange.Attached my sample file for your reference.If possible,please share your .pbix file.You can upload the .pbix file to OneDrive and post the link here. Do mask sensitive data before uploading.
Regards,
Cherie
Thank you for the PBI file.
Interesting thing I noted. When I open your PBI it shows correctly. When I go to the formula and rerun it in you pbi the same error appears.
I think I might miss an extension file not supporting the DAX function??
Will upload my PBI shortly.
Hi @Anonymous
Try to re-install the power bi desktop from latest version of Power BI Desktop.
Regards,
Cherie
@v-cherch-msft This will be my next step. My co worker has an older version of BI and he managed to run extacly the same formula except he replaced the , with ; and it worked.
Will post an update after re - installation.
I am at a complete loss. Removed Bi and reinstalled it and still no luck.
Thinking of copying my co workers route folder over to see if this works.
Any other suggestions would be helpfull.
Hi @Anonymous
Please check if this page's awareness could help you.
Regards,
Cherie
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
113 | |
99 | |
75 | |
73 | |
49 |
User | Count |
---|---|
145 | |
109 | |
109 | |
90 | |
64 |