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.
I am trying to calculate yesterday so I can correctly work with our weird shift schedule. Here is what I have so far.
DateOfInterest =
IF (
HOUR ( NOW () ) >= 0
&& HOUR ( NOW () ) <= 6,
DAY ( TODAY () ) - 1,
DAY ( TODAY () )
)
I'm concerned that this will not correctly handle things at the end/start of a month, but I just can't think of how to correct for that.
Solved! Go to Solution.
Hi,
If you are just interested in the previous datenumber you can simply include the -1 within the DAY funtion.
For example this dax day(1/12/2021-1)
will return 30.
I hope this helps to solve your issue and if it does consider accepting this as a solution!
Proud to be a Super User!
Hi,
If you are just interested in the previous datenumber you can simply include the -1 within the DAY funtion.
For example this dax day(1/12/2021-1)
will return 30.
I hope this helps to solve your issue and if it does consider accepting this as a solution!
Proud to be a Super User!
Thanks for that! I feel kinda stupid for not even thinking to try that. Works great!
User | Count |
---|---|
28 | |
12 | |
8 | |
7 | |
5 |
User | Count |
---|---|
36 | |
14 | |
12 | |
7 | |
7 |