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.
Need help guys. I'm new in PowerBI. How can I count the items where the State is not yet set to Started (or still remains set to Approved) past 30 mins or more of its Start Date/Time. And also how can I count the items where the State is not yet set to Closed or still remains set to either Approved/Implement past 1 hour or more of its End Date/Time. Thanks in advance.
Item | Start Date/Time | End Date/Time | State |
1 | 3/1/2024 06:00 PM | 3/1/2024 10:00 PM | Approved |
2 | 3/2/2024 1:00PM | 3/2/2024 5:00PM | Started |
3 | 3/4/2024 3:30PM | 3/4/2024 11:30PM | Approved |
Hi @achybreaky ,
Please create a new measure:
Count of items with over 30 mins and Started or Approved state =
COUNTROWS (
FILTER (
SUMMARIZE (
'Table',
'Table'[Item],
'Table'[Start Date/Time],
'Table'[End Date/Time],
'Table'[State],
"@MINUTE", DATEDIFF ( 'Table'[Start Date/Time], 'Table'[End Date/Time], MINUTE )
),
// filter out records with state 'Started' or 'Approved'.
'Table'[State]
IN { "Started", "Approved" }
// and filter out records with endtime and starttime over 30 minutes or more.
&& [@MINUTE] > 30
)
)
Best Regards,
Gao
Community Support Team
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!
How to get your questions answered quickly -- How to provide sample data in the Power BI Forum -- China Power BI User Group
Thank you for your reply, I really appreciate it. I want to add more context to my problem. I was able to use this parameter in Servicenow but I want to use the same parameters to PowerBI. I also added additional item in the table for distinction.
Basically I want to display two items in my PowerBI. First is the number of items that had missed the Start Date/Time because the State still shows Approved instead of Started after 30 minutes or more past its Start Date/Time. Second the number of items that had missed the End Date/Time because the State still shows either Approved or Started after 1 hour or more past its End Date/Time. The count will remain as is until the correct State is updated. Items with future date/time are not supposed to be counted.
Missed Start Date/Time:
1. Start Date/Time is 30 Minutes ago from Now
2. Start Date/Time is less than today
3. State is Approved, not Started
3. Excluding future date
Missed End Date/Time:
1. End Date/Time is 1 hour ago from Now
2. End Date/Time is less than today
3. State is either Approved or Started, not Closed
Item | Start Date/Time | End Date/Time | State |
1 | 3/1/2024 06:00 PM | 3/1/2024 10:00 PM | Approved |
2 | 3/2/2024 1:00PM | 3/2/2024 5:00PM | Started |
3 | 3/4/2024 3:30PM | 3/4/2024 11:30PM | Approved |
4 | 3/8/2024 3:30AM | 3/8/2024 8:30AM | Approved |
Please provide a more detailed explanation of what you are aiming to achieve. What have you tried and where are you stuck?
Hi,
Thank you for your reply.
I tried to use this formula and then use the filter pane to filter the state, but this doesnt provide the specific data if they missed updating the State 30 mins or 1 hour past the start or end date/time.