Forum Discussion
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".
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.
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!!
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"} )
2 Replies
- AnonymousNot applicable
Fowmy You are a god among men! Thank you so much!!
- FowmySuper 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"} )