Forum Discussion
Count values in one column that have consistent values in another column
Hi freemainia ,
Create a calculated colum to pikcup any of the rating per requirement and then compare it against the rating in a row. If the rating vs the random rating is the same, return 1 else 0.
Rating Check =
VAR rating =
CALCULATE (
MAX ( 'Table'[Rating] ),
FILTER ( 'Table', 'Table'[Requirement] = EARLIER ( 'Table'[Requirement] ) )
)
RETURN
IF ( 'Table'[Rating] = rating, 0, 1 )
Create another calculated column to get the sum of Rating Check (calculcated column previous created) per requirement. If the sum if zero then constentent = yes else no
Consistent? =
IF (
CALCULATE (
SUM ( 'Table'[Rating Check] ),
ALLEXCEPT ( 'Table', 'Table'[Requirement] )
) > 0,
"No",
"Yes"
)
Then in a visual, get the distinct count of requirement split between whether it is consistent or not.
Please see attached pbix for details
Thanks danextian for your quick response.
A few complicating things:
- My Rating column doesn't actually have numbers in it (just the "I need X...")
- Is it possible for the solution to created through measures? As, the count of consistent and inconsistent would ideally need to change based off the number of Raters selected.
- danextian3 years ago
Super User
Hello,
Can you please post a sample data that actually represents your current use case? Sometimes an overly simplied sample data results to an overly simplified solution 😊
- freemainia3 years ago
Helper I
Hi danextian . Thanks again.
How do I share the PBIX? Like below? SOrry
https://drive.google.com/file/d/1gP5jRQYJrZMNDAkuT0-ZDI4EyFYG2afi/view?usp=share_link