Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
Hello!
I'm totally new with Power BI but managed to connect an SQL and an Oracle database with DirectQuery and create a fancy report. But there I some things in Power Bi that I don't understand and I did not find an answer yet.
One example I hope you guys can help me with:
I wanted to convert Seconds (counted as seconds after midnight) to an actual time. But no function from wich I thought it would work worked. When I try to use the Time function like
Zeit_letzte_Meldung = Time(0,0,Databasefieldname)
it alway can't display my visual anymore. I also tried to first divide the seconds with 3600 to get the decimal time but I could not format this either.
What am I doing wrong here? Generally because of the different coding languages and the different places you can put the code I find it very hard to find the right answer to a problem so I would be very glad when you can help me!
BR
GL_OSS
I think you have right thoghts about troubleshooting.
Can you provide a snippet of your data? What is your input in your model and what do you expect as result.
Maybe my undestanding would be better and I can try another approach.
No - I only got the time in seconds.
ok, maybe I had have a similar case in the past.
I have a field which is filled with Millisecond (basically it should be a DateTime).
So I converted this number into a "correct" (readable) DateTime.
Like this:
Is that something similar to your case?
After converting you can extract the "time" part with e.g. RIGHT(your_table[converted_column], 8 )
Regards
Hmm - not quite sure. When it did not work with the TIME function I did create a custom field called "Decimaltime" (DatabaseFieldWithSecondsAfterMidnight/3600). Tried to Format it and same result. It seems I'm not allowed to do such kinds of transformations with directQuery. Or - what also can be - I do it in a wrong way. Perhaps I have to create more steps or so but all attemps ended in an error and I tried A LOT.
Hey @GL_OSS ,
congrats to your achievements as a newby so far.
Hmm, since you have SQL and Oracle DBs in your access...is there one column (DateTime?) in your DB tables which gives you expexted column format?
If yes, you can try extract Time from this field using PQ.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
147 | |
85 | |
66 | |
52 | |
46 |
User | Count |
---|---|
215 | |
90 | |
83 | |
66 | |
58 |