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

July 28 - August 9 | Final Round of the Power BI Dataviz World Championships. This is your chance. Learn more

Reply
elac
Frequent Visitor

How to count the zero usage device?

Hi there,

I'm new to the PowerBi.

I have a device usage table (TableA) with all the devices and monthly usage data.

How can I calculate the number of devices (count) that were no use?

 e.g 2020-01 only, there were two devices (B and C) has no hour use.

if both 2020-01 and 2020-02 are selected, then only one device (B) has no hour use.

  

Device

Month

Use Hours

A

2020-01

    1

A

2020-02

    2

B

2020-01

    0

B

2020-02

    0

C

2020-01

    0

C

2020-02

   1

D

2020-01

   1

D

2020-02

   0

 

I was trying to use Calculate, but PowerBI doesn't allow the caculate function with a measure in the filter section?

 measure_total_use = sum(TableA[Use Hours])

measure_zero_Use_Count = Caculate(distinctcount(TableA[Device], [measure_total_use]=0))

 How to the get the count of no-use device from the table A above?

 I appreciate any help!

 

Elac

1 ACCEPTED SOLUTION
ryan_mayu
Super User
Super User

@elac 

you can try this

Measure 2 = CALCULATE(DISTINCTCOUNT('Table'[device]),FILTER(VALUES('Table'[device]) ,[Measure]=0))

1.PNG





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

Proud to be a Super User!




View solution in original post

3 REPLIES 3
elac
Frequent Visitor

wow! That works. The values function is wonderful here! 

Thank you so much!

 

you are welcome





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

Proud to be a Super User!




ryan_mayu
Super User
Super User

@elac 

you can try this

Measure 2 = CALCULATE(DISTINCTCOUNT('Table'[device]),FILTER(VALUES('Table'[device]) ,[Measure]=0))

1.PNG





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

Proud to be a Super User!




Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

Fabric Community Sticker Design Challenge Barcelona Carousel

Fabric Community Sticker Challenge - Barcelona 2026

If you love stickers, then you will definitely want to check out our community sticker challenge, Barcelona edition!

July Power BI Update Carousel

Power BI Monthly Update - July 2026

Check out the July 2026 Power BI update to learn about new features.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Top Solution Authors