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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
pbidrook
Regular Visitor

creating a percentage for time

Hey everyone, I am needing to find the amount of time a network is online per month. I have the total minutes each network is online per month. 

 

how can I go about doing this?

1 ACCEPTED SOLUTION
Adescrit
Impactful Individual
Impactful Individual

You can use the DATEDIFF function with MINUTE as the interval to calculate the total minutes between two dates.

If you have a date dimension I would use that as the basis, and try a measure such as this:

 

% Time Online =
VAR __TimeOnline = [TimeOnlineMeasure]
VAR __MinDate = MIN( Dates[Date] )
VAR __MaxDate = MAX( Dates[Date] )
VAR __TotalMinutes = 
    DATEDIFF( __MinDate, __MaxDate, MINUTE ) 
RETURN
   DIVIDE( __TimeOnline ,  __TotalMinutes )

 

 TimeOnlineMeasure is the placeholder for the calculation that gives you the total minutes the network was online.


Did I answer your question? Mark my post as a solution!
My LinkedIn

View solution in original post

1 REPLY 1
Adescrit
Impactful Individual
Impactful Individual

You can use the DATEDIFF function with MINUTE as the interval to calculate the total minutes between two dates.

If you have a date dimension I would use that as the basis, and try a measure such as this:

 

% Time Online =
VAR __TimeOnline = [TimeOnlineMeasure]
VAR __MinDate = MIN( Dates[Date] )
VAR __MaxDate = MAX( Dates[Date] )
VAR __TotalMinutes = 
    DATEDIFF( __MinDate, __MaxDate, MINUTE ) 
RETURN
   DIVIDE( __TimeOnline ,  __TotalMinutes )

 

 TimeOnlineMeasure is the placeholder for the calculation that gives you the total minutes the network was online.


Did I answer your question? Mark my post as a solution!
My LinkedIn

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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