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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
iandespradel
Regular Visitor

Visual % Days Worked

I work in a company that lends equipment and machinery for construction projects.

 

I have +100 equipment, each identify by an unique ID.

 

I have a log of all the borrowed equipment.(Status: "Active", id 1)

 

And a log of all the equipment being repaired.(Status: "Broken", id 2)

 

I dont't have a daily log of all the equipment available, waiting to be borrow (Status: "Standby", id 0)

 

I've combine both log tables, resulting:

 

Date                           ID.Equip             Status
10/5/2020                    A101                 Active
10/5/2020                    A102                 Active
10/5/2020                    A103                 Broken
.
.
.
10/6/2020                    A101                 Active
10/6/2020                    A102                 Broken
10/6/2020                    A103                 Active
.
.
.
10/8/2020                    A101                 Active
10/10/2020                  A102                Broken
11/11/2020                  B103                 Active

 

If an equiment isn't shown in this table, it means it's in "Standby" for that date (the date is not shown either, as it jumps to the next registry). And not all the equipment ids are listed, because not all equipment have had being "active" or "broken" atm.


I also have a database table with a list of all the equipment.
A101
A102
A103
A104
B101
B102

.

.

.

 

And a calendar table.


I want to create a visual that shows the % of the days "Broken" in a month from the total of days

 

And a visual that shows the % of the "Active" days from the "Standby" days

 

And maybe a combination of "Standby", "Active" and "Broken" as a stacked or 100% stacked chart.

 

I've attached and Example of the data and the types of visuals I have in mind:
PowerBI 

Table 1 

Table 2 

3 REPLIES 3
v-zhenbw-msft
Community Support
Community Support

Hi @iandespradel ,

 

How about the result after you follow the suggestions mentioned in my original post?

Could you please provide more details or expected result about it If it doesn't meet your requirement?

If you've fixed the issue on your own please kindly share your solution. If the above posts help, please kindly mark it as a solution to help others find it more quickly.

 

Best regards,

 

Community Support Team _ zhenbw

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

v-zhenbw-msft
Community Support
Community Support

Hi @iandespradel ,

 

Do you want to show a pie chart and 100% column chart like this? You can refer the page 2 in the pbix that we attached.

 

Visual1.jpg

 

If yes, you need to create two measures for pie chart.

 

Broken = CALCULATE(DISTINCTCOUNT('00_CONTROL'[Fecha]),FILTER(iStatus_Eq,iStatus_Eq[Status.Eq]="Broken"))

 

Total with no Broken = CALCULATE(DISTINCTCOUNT('00_CONTROL'[Fecha]),ALLSELECTED('00_CONTROL'))-[Broken]

 

Then you can add a slicer to control the Month.

If it doesn’t meet your requirement, could you please show the exact expected result based on the table that you have shared?

 

Best regards,

 

Community Support Team _ zhenbw

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

BTW, pbix as attached.

amitchandak
Super User
Super User

@iandespradel , check if a measure like this can work

 

Broken % =
var _tot = countx(equipment,equipment[ID])
return
divide(calculate(distinctcount(Table[ID.Equip]), filter(Table, Table[Status] ="Broken")), _tot)

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors