The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
Hi community,
I have one culumn with format time (ej. 20:00:05, 05:52:00, etc.),
I want to use the IF formula for search for all records that are between 23:00 and 05:00. I try with the next formula:
Cruce = IF(Iave[Hora de Cruce ]>TIMEVALUE("23:00:00") && Iave[Hora de Cruce ]<TIMEVALUE("05:00:00"),1,0)
but doesn´t work. Any suggestion for resolve this?
Regards.
Solved! Go to Solution.
I have the free version as well.
My suspicion is something wrong with your time values, maybe those are regarded as minutes, seconds, fractions or something.
If you try and shift your TIMEVALUE("05:00:00") to TIMEVALUE("00:15:00"), what happens?
Just a wild shot, actually I don't understand either why it isn't woking for you.
@Ivanfa23,
The formula MarcelBeug provides also works well in my environment. What version of Power BI Desktop do you use? Would you mind sharing me your PBIX file?
Regards,
It should be OR (||), not AND (&&).
It works fine with me, but notice the trailing space in column name "Hora de Cruce ".
I tried it again but it doesn´t work
I have Power BI Desktop Free, do you think that's the problem?
P.D. I remove the blank of "Hora de Cruce".
Regards.
I have the free version as well.
My suspicion is something wrong with your time values, maybe those are regarded as minutes, seconds, fractions or something.
If you try and shift your TIMEVALUE("05:00:00") to TIMEVALUE("00:15:00"), what happens?
Just a wild shot, actually I don't understand either why it isn't woking for you.