Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
Hello everyone! I have asked the same type of question but I can't figure out how to tweak the DAX function wherein the ID from a previous datetime will be tagged as HOLD if it enters today's datetime.
This previous discussion is for your reference: How to get duplicates from a 4 -hour interval - Microsoft Power BI Community
@zettipasta , I think you need additional date column for that
date = datevalue([Datetime])
New column =
var _time = [DateTime] -time(4,0,0)
var _cnt =countx(filter(Table, [ID] = earlier([ID]) && [DateTime]>= _time && [DateTime]< earlier([Datetime]) && [date] = earlier([date]) ), [ID])
var _cntall =countx(filter(Table, [ID] = earlier([ID]) && [DateTime]< earlier([Datetime]) && [date] = earlier([date]) ), [ID])
return
Switch(True(),
not(isblank(_cnt)), "Hold",
isblank(_cnt) && not(isblank(_cntall)), "Release",
"Hold"
)
If the old one is helping, mark that as a solution.
I did add an additional column for the date, but the output that I desire is that when the same id e.g., ID 1 from 10/24 at 8pm enters the latest datetime, it would still be tagged as hold
Although the 4-hour interval works, it doesn't count for across dates but only for the current datetime.. The ID is released at 12am when it should still subtract the hour, making it at 8pm, still tagging it as hold.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
16 | |
13 | |
12 | |
11 | |
11 |
User | Count |
---|---|
19 | |
14 | |
14 | |
11 | |
9 |