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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
Anonymous
Not applicable

PowerBI Counting Unique Strings

Hello I have been trying to troubleshoot this issue for the last few days and have had little luck. Hopefully someone will be able to help. I have a gauge visualization where I am trying to show the amount of complete reports compared to uncomplete reports.

 

I want to count and sum the amount of times the words "Not Required", "Not Complete" and "Complete" come up in a specific column while being filtered by another column with all the results that have "East" location and filtered by another column that does not include "Design Active", "Cancelled", "On-Hold" and "Use Typical".

 

kevin66_0-1621619174077.png

 

Here is the code I tried implementing and while the first half of it works I do not know how to filter these results based on East and not including the few other options.

 

This sum will represent the maximum value of the Gauge chart.

 

kevin66_1-1621619375975.png

 

Here is a sample from the dataset to help explain what I am trying to do:

 

1) Filter for only East Discipline

2) Filter for workflow not containing: "Design Active", "Cancelled", "On-Hold" and "Use Typical"

3) Sum all "Not Complete", "Complete" and "Not Required" for designer inspection

 

Once that sum is calculated it will be used as the maximum value for the gauge chart I am working on.

 

Any help is wholeheartedly appreciated!!

 

1 ACCEPTED SOLUTION
Fowmy
Super User
Super User

@Anonymous 

I think the below measure should give you the desired results:

Count Measure = 

CALCULATE(
    COUNTROWS( 'Table' ),
    'Table'[Discipline] = "East",
    NOT 'Table'[Workflow] IN {"Design Active", "Cancelled", "On-Hold" ,"Use Typical"},
    'Table'[Designer Inspection] IN {"Not Complete", "Complete","Not Required"}  
)

 

Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

@Fowmy You are a god among men! Thank you so much!!

Fowmy
Super User
Super User

@Anonymous 

I think the below measure should give you the desired results:

Count Measure = 

CALCULATE(
    COUNTROWS( 'Table' ),
    'Table'[Discipline] = "East",
    NOT 'Table'[Workflow] IN {"Design Active", "Cancelled", "On-Hold" ,"Use Typical"},
    'Table'[Designer Inspection] IN {"Not Complete", "Complete","Not Required"}  
)

 

Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

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!

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

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