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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
SebastianCostas
Frequent Visitor

Distinct Count only when Count over a number

I have a table for Incidentes and I need to know the amount of tickets by analyst we are having, but we have a few analyst that only log in for special tickets and solve maybe 1 or 2 tickets in a month and are breacking my measure. I try adding a filter but it's not working

Incidents by Analysts =
VAR Last = max(CreatedDate[Date].[Date])
VAR First = min(CreatedDate[Date].[Date])
VAR QIncidents = CALCULATE(count(ITSM_Incidents[Key]), ITSM_Incidents[Createdwithouthour] >= First , ITSM_Incidents[Createdwithouthour] < Last)
VAR QAnalistas = CALCULATE(DISTINCTCOUNT(ITSM_Incidents[Assignee]),FILTER(ITSM_Incidents,count(ITSM_Incidents[Assignee])>100))


return QIncidents / QAnalistas
2 ACCEPTED SOLUTIONS
amitchandak
Super User
Super User

@SebastianCostas , try

 

Assignee cnt = count(ITSM_Incidents[Assignee])

Incidents by Analysts =
VAR Last = max(CreatedDate[Date].[Date])
VAR First = min(CreatedDate[Date].[Date])
VAR QIncidents = CALCULATE(count(ITSM_Incidents[Key]), ITSM_Incidents[Createdwithouthour] >= First , ITSM_Incidents[Createdwithouthour] < Last)
VAR QAnalistas = Countx(FILTER(values(ITSM_Incidents[ITSM_Incidents[Assignee]]), [Assignee cnt ] >100) , ITSM_Incidents[Assignee])

 

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here

View solution in original post

I did an small change to what you sent me and is working perfctly

Incidents by Analysts =
VAR Last = max(CreatedDate[Date].[Date])
VAR First = min(CreatedDate[Date].[Date])
VAR QIncidents = CALCULATE(count(ITSM_Incidents[Key]), ITSM_Incidents[Createdwithouthour] >= First , ITSM_Incidents[Createdwithouthour] < Last)
VAR QAnalistas = countx(filter(VALUES(ITSM_Incidents[Assignee]),[Assigne cnt]>100),ITSM_Incidents[Assignee])

return QIncidents / QAnalistas

View solution in original post

3 REPLIES 3
amitchandak
Super User
Super User

@SebastianCostas , try

 

Assignee cnt = count(ITSM_Incidents[Assignee])

Incidents by Analysts =
VAR Last = max(CreatedDate[Date].[Date])
VAR First = min(CreatedDate[Date].[Date])
VAR QIncidents = CALCULATE(count(ITSM_Incidents[Key]), ITSM_Incidents[Createdwithouthour] >= First , ITSM_Incidents[Createdwithouthour] < Last)
VAR QAnalistas = Countx(FILTER(values(ITSM_Incidents[ITSM_Incidents[Assignee]]), [Assignee cnt ] >100) , ITSM_Incidents[Assignee])

 

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here

I did an small change to what you sent me and is working perfctly

Incidents by Analysts =
VAR Last = max(CreatedDate[Date].[Date])
VAR First = min(CreatedDate[Date].[Date])
VAR QIncidents = CALCULATE(count(ITSM_Incidents[Key]), ITSM_Incidents[Createdwithouthour] >= First , ITSM_Incidents[Createdwithouthour] < Last)
VAR QAnalistas = countx(filter(VALUES(ITSM_Incidents[Assignee]),[Assigne cnt]>100),ITSM_Incidents[Assignee])

return QIncidents / QAnalistas

Thank you very much, but i'm having an error with the last var:

SebastianCostas_0-1659105300699.png

 

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.