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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
toddpbi
Helper II
Helper II

Counting values with unique filter as filter argument

Hello Power BI community,

 

Here is what my current data looks like in Power BI.

 

ID         Solution
1           Solved
1           Solved
2           Not Solved

2           Not Solved
3           Solved
4           Solved

I am trying to create a measure which counts the amount of solved transactions for a unique ID value.
Currently, I am using the following measure:

Number of Resolutions = CALCULATE(Countrows('FACT-CallTable'), 'FACT-CallTable'[Solved]="Solved", ???))

Is there a particular filter argument I can use within this formula to ensure the count of solution is not double counted?

Regards,

2 ACCEPTED SOLUTIONS
toddpbi
Helper II
Helper II

Number of Resolutions = COUNTAX(VALUES('FACT-CallTable'[Column]), CALCULATE(COUNT(:Table"[Column]), 'Table'[Column] = "true"))

 

Solved with the following formula thanks to a reference in another post. If anyone has any other methods please let me know. 🙂

View solution in original post

v-yuezhe-msft
Employee
Employee

@toddpbi,

Create  a measure using DAX as below.

Number of Resolutions = CALCULATE(DISTINCTCOUNT('FACT-CallTable'[ID]), FILTER('FACT-CallTable','FACT-CallTable'[Solution]="Solved"))

1.JPG


Regards,
Lydia

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

View solution in original post

3 REPLIES 3
v-yuezhe-msft
Employee
Employee

@toddpbi,

Create  a measure using DAX as below.

Number of Resolutions = CALCULATE(DISTINCTCOUNT('FACT-CallTable'[ID]), FILTER('FACT-CallTable','FACT-CallTable'[Solution]="Solved"))

1.JPG


Regards,
Lydia

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

Thanks Lydia,

 

Worked a charm. My formula above also works too. Sorry for the simple question.

toddpbi
Helper II
Helper II

Number of Resolutions = COUNTAX(VALUES('FACT-CallTable'[Column]), CALCULATE(COUNT(:Table"[Column]), 'Table'[Column] = "true"))

 

Solved with the following formula thanks to a reference in another post. If anyone has any other methods please let me know. 🙂

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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