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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
ch4rch
Frequent Visitor

calculate the number of working agents [Name] by number of dates [Date]

I have understood that multiply doesn't exist in DAX in the same way that divide does. I am trying to calculate the number of working agents [Name] by number of dates [Date] But I need the Distinct count of the name as each name can appear 20 times on a date. Essentially the sum would be Multiply DISTINCTCOUNT [NAME], SUM [Date] but that obviously does not work. Any ideas?

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@ch4rch , not very clear try like

 

COUNTROWS(SUMMARIZE('Table','Table'[Name],'Table'[Date]))

 

This will count distinct name and date

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

View solution in original post

8 REPLIES 8
amitchandak
Super User
Super User

@ch4rch , not very clear try like

 

COUNTROWS(SUMMARIZE('Table','Table'[Name],'Table'[Date]))

 

This will count distinct name and date

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
harshnathani
Community Champion
Community Champion

Hi @ch4rch ,

 

You can use * or Product in DAX.

 

Not sure what is the usecase.

 

Total = DISTINCTCOUNT(Table [Agent Name]) * COUNT(Table[Dates])

 

Regards,

Harsh Nathani

 

 

Thanks, this works in that it gives me the number for all dates but if I filter the dates it does not seem to change.

@ch4rch , I hope the comment was not for the formula I shared. Seems like that did not work.

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

Hi, 

 

I initially dismissed your solution as to me (who clearly does not know what he is doing) it didn't look like it answered my question. However given your follow up comment I tried it and I think you have solved my issue.

 

I apologise, thank you so much. never again will I be so dismissive.

 

 

 

Hi @ch4rch ,

 

Please share sample data and expected output?

 

not very clear.

 

Regards,
Harsh Nathani
Did I answer your question? Mark my post as a solution! Appreciate with a Kudos!! (Click the Thumbs Up Button)

Hi, 

 

I cannot really share data as it contains company information.

 

What I have is a list of interactions in a call centre.

 

Columns are:

Date/Time

Date only

Agent Name

Team

Media

Direction

Talk Time

Wait Time

 

And a few others that are not relevent.

 

So for a given data an Agents name may appear in 20 rows however I am trying to understand how many unique agents worked on a given day multiplied by the number of dates in the filter.

 

Using a DISTINCTCOUNT of Agent Names I get the number of Unique Agents that worked in that period but I am trying to work out how many agent days I had in a week.

 

Does that make sense? 

 

Hi @ch4rch ,

 

Incase you need weeks, see if this helps you.

 

https://community.powerbi.com/t5/Community-Blog/Week-Is-Not-So-Weak-WTD-Last-WTD-and-This-Week-vs-La...

 

Regards,

Harsh Nathani

Helpful resources

Announcements
July PBI25 Carousel

Power BI Monthly Update - July 2025

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

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.