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

The ultimate Microsoft Fabric, Power BI, Azure AI & SQL learning event! Join us in Las Vegas from March 26-28, 2024. Use code MSCUST for a $100 discount. Register Now

Reply
freemainia
Helper I
Helper I

Count values in one column that have consistent values in another column

I have a load of requirements that are prioritised by a number of people. I would like to know how many of the requirements are rated consistently, and how many are rated inconsistently.

 

For example, for the below table, this would be:

Rated consistently = 2

Rated inconsistently = 1

 

RaterRequirementRating
Luke1. I need Power BI to be awesomeHigh
Tim1. I need Power BI to be awesomeMedium
Paul1. I need Power BI to be awesomeHigh
Luke2. I need a mouseLow
Tim2. I need a mouseLow
Paul2. I need a mouseLow
Luke3. I need skillsMedium
Tim3. I need skillsMedium
Paul3. I need skillsMedium

 

 

4 REPLIES 4
danextian
Super User
Super User

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.

 

danextian_0-1668655682512.pngdanextian_1-1668655694632.png

 

Please see attached pbix for details

 






Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu.

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.

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 😊






Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu.

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

Helpful resources

Announcements
Fabric Community Conference

Microsoft Fabric Community Conference

Join us at our first-ever Microsoft Fabric Community Conference, March 26-28, 2024 in Las Vegas with 100+ sessions by community experts and Microsoft engineering.

February 2024 Update Carousel

Power BI Monthly Update - February 2024

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

Fabric Career Hub

Microsoft Fabric Career Hub

Explore career paths and learn resources in Fabric.

Fabric Partner Community

Microsoft Fabric Partner Community

Engage with the Fabric engineering team, hear of product updates, business opportunities, and resources in the Fabric Partner Community.