Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
J918
Frequent Visitor

Datediff slicer not correct

I have this DAX code to show how many minutes a process ran: 

Process Time Minutes = DATEDIFF(META[PROCESS_START_TIME], META[PROCESS_END_TIME], MINUTE)
 
I then put a slicer:
J918_0-1717094932076.png

However, it's showing anything less than 1 minute, but more than 1 second as 1 minute.  If I have the minimum time on 1, it should not show any rows less than 1 minute.  

 

For example, these rows are returned with the slicer above applied, but shouldn't.  

 J918_1-1717095053471.png

 

Please help! 

1 ACCEPTED SOLUTION
J918
Frequent Visitor

I figured it out.  Changed my DAX to:

 

Process Time Minutes = DATEDIFF(META[PROCESS_START_TIME], META[PROCESS_END_TIME], SECOND) / 60

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

@J918 

We are really glad to know that the problem has been solved. We're also glad that you've shared your solution in the community, it's very helpful.

 

Please consider accepting your post as a solution to help other members find solutions faster.

 

Certainly, if there is anything else we can do for you, please do not hesitate to contact us.

Best Regards,

Leroy Lu

mark_endicott
Super User
Super User

@J918 - The slicer is turning the correct values for what you are doing. In order for this to work, you will need to turn your column into an integer for minutes, try:

 

 

DATEDIFF(META[PROCESS_START_TIME], META[PROCESS_END_TIME], SECOND) / 60

 

 

If this works, please accept it as a solution.

J918
Frequent Visitor

I figured it out.  Changed my DAX to:

 

Process Time Minutes = DATEDIFF(META[PROCESS_START_TIME], META[PROCESS_END_TIME], SECOND) / 60

Helpful resources

Announcements
June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.

Top Solution Authors