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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
Anonymous
Not applicable

Total Count Based on Slicer

Hi everyone this is my first go with Power Bi. Apologies for asking what probably amounts to a very simple question. Anyhow I've been asked to provide a report from our access card system which would show the # of days various employees came into the office. I have a slicer that allows the user to filter the starting and end dates.

 

What I can't figure out is how to create a measure / calculation that in this case would provide a value of 5 for building cleaning crew as an example with the date range filtered here as 5/1/23 - 5/5/23. 

 

Brendan80_0-1684183729119.png

 

2 REPLIES 2
Anonymous
Not applicable

Hi @amitchandak thank you for replying and my apologies as I didn't explain very well. There's another slicer which I'm not showing that allows for filtering based on our office locations.

 

So when you filter by office location(s) and date range you'll be presented with all the card activity during that time. What I need is a count of the # days during that range per each individual cardholder.

 

So here for example we see 4 different cardholders.

 

Brendan80_1-1684346686865.png

 

amitchandak
Super User
Super User

@Anonymous , Have slicer on date that will filter that (Or use date table joined with date and use that in filter)

 

You can have slicer for cleaning crew or have filter in measure

 

countrows(filter(Table, search("Cleaning", [Last, First],,0) >0 ) )

 

you can also consider distinctcount

calculate(distinctcount(Table[Last, First) ,filter(Table, search("Cleaning", [Last, First],,0) >0 ) ) 

 

 

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
FabCon Global Hackathon Carousel

FabCon Global Hackathon

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

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.