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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
TempoClick
Frequent Visitor

Percentage of time durations out of total time of a selected month in a Pie Chart

Hi,

 

You can say I am new to Power BI.

I have the following table which contains a startDate and endDate of car usage. I have calculated the durations in HOURS in a new column "Duration_Hours" using the formula:   DATEDIFF(Car_Usage[Start_Time]; Car_Usage[End_Time];HOUR).

 

2018_02_14_12_35_54_CAR_USAGE_DASH_Power_BI_Desktop.jpg

 

 

I want to plot a Pie Chart showing the percentage of total hours of durations out of total hours of a selected month.

So for example, if I select "January 2018" in a filter I would get the usage hours in January out of 744 hours (hours of January = 31 * 24).

 

How can I do this?

 

Thanks

2 REPLIES 2
Greg_Deckler
Super User
Super User

I'm thinking that the tricky part here is for usage that spans months, correct? Is that what you are concerned about?



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
Power BI Cookbook Third Edition (Color)

DAX is easy, CALCULATE makes DAX hard...

I am trying to find a way to link  a calendar to my durations (For example, a calendar starting from 01/01/2018 and ending on the maximum date in my table), so that when I filter by month I get the durations inside this month and I view a pie chart of, for example: 40% usage out of total month's hours. I am finding difficulty linking durations to time filter.

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.