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

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.

Reply
helgekooi
New Member

Not able to calculate average from distinctcount

I'm an absolute beginner, with experience in excel. In powerBI i try to calculate the average instead of subtotals.

 

I created a calculated field to devide two parameters, that worked:

Bezetting 1,5m = (DIVIDE(   DISTINCTCOUNT('Export_150_cm_gebruik'[PC's actief]),    Calculate(DISTINCTCOUNT('PC''s'[PC's beschikbaar]), 'PC''s'[150cm] IN {"ja"})))
2020_06_04_22_20_05_rapportage_150cm_nieuw_Power_BI_Desktop.jpg
Difficult to explain what i want, but i'll try:
 

Field 1 contains the pc's in a specific location that are safe to work in Covid-social distancing. Field 2 contains the pc's that were active and stated safe to work on. Field 4 contains pc's that were active but not safe to wordk on. 

 

The calculated field divides measure 2 by 1, to get the result 3 (I'm kinda proud that that works)

The same happens with field 4 (divided by field 1). The total (field 6) is calculated correctly.

 
2 REPLIES 2
v-lili6-msft
Community Support
Community Support

hi  @helgekooi 

Do you mean for Field 4, it shoudl divide by 1308?

 

What is formula of measure [Totaal van PC's actief]?

It should as this:

Totaal van PC's actief = Calculate(DISTINCTCOUNT('PC''s'[PC's beschikbaar]), 'PC''s'[150cm] IN {"ja"}))

 

If not your case, please share your sample pbix file for us have a test.

 

Regards,

Lin

Community Support Team _ Lin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
parry2k
Super User
Super User

@helgekooi I would recommend to post the raw sample data and expected output rather than image, it will be easier to work with sample data.



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

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

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
Top Kudoed Authors