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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

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
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

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