Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
Hello,
Could somebody help me with measure which should produce "Entry_Date" as the earliest date between 2 dates with time between 15:00 PM to next day 03:00 AM from "Created".
Thanks,
Created | Entry_Date |
11/10/2021 16:23 | 11/10/2021 |
11/10/2021 17:23 | 11/10/2021 |
11/10/2021 18:23 | 11/10/2021 |
11/10/2021 18:27 | 11/10/2021 |
11/10/2021 19:10 | 11/10/2021 |
11/10/2021 19:30 | 11/10/2021 |
11/11/2021 0:30 | 11/10/2021 |
11/11/2021 0:35 | 11/10/2021 |
11/11/2021 0:45 | 11/10/2021 |
11/11/2021 1:30 | 11/10/2021 |
11/11/2021 2:30 | 11/10/2021 |
Solved! Go to Solution.
Hi @Anonymous
Try this code to add a new column to your table:
Column =
Var _Time = TIMEVALUE([Created])
Var _S = time(15,00,00)
Var _E = time(3,0,0)
return
format(if(_Time<_E,DATEVALUE([Created])-1,DATEVALUE([Created])),"MMMM DD")
Output:
If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
LinkedIn: www.linkedin.com/in/vahid-dm/
Hi @Anonymous
Try this code to add a new column to your table:
Column =
Var _Time = TIMEVALUE([Created])
Var _S = time(15,00,00)
Var _E = time(3,0,0)
return
format(if(_Time<_E,DATEVALUE([Created])-1,DATEVALUE([Created])),"MMMM DD")
Output:
If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
LinkedIn: www.linkedin.com/in/vahid-dm/
@Anonymous Maybe:
Measure =
VAR __Created = MAX('Table'[Created])
VAR __CreatedDate = DATE(YEAR(__Created),MONTH(__Created),DAY(__Created))
VAR __MinDate = __CreatedDate + 3/24 + 1/24/60
VAR __MaxDate = __CreatedDate + 1 + 3/24
VAR __Min = MINX(FILTER(ALL('Table'),[Created]>=__MinDate && [Created]<=__MaxDate),[Created])
RETURN
DATE(YEAR(__Min),MONTH(__Min),DAY(__Min))
Not sure, where is the issue as am not seeing the expected results. 2nd column "Login_Date" is the expected output, while i used the given DAX in 3rd column "Column"
Thanks
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 |
---|---|
10 | |
9 | |
7 | |
6 | |
5 |
User | Count |
---|---|
20 | |
11 | |
10 | |
9 | |
6 |