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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
vnqt
Helper V
Helper V

Compare value in the same column

Hi

 

I have table below : 

NameGroupValue
A120
B120
120
220
224
312
312
H312
412
420
K424
L412
M412
412

 

I would like to compare the value in the same group, all the values in the same group must be identical == > OK, If not KO 

The result is as below : 

NameGroupValueCoherence
A120OK
B120OK
120OK
220KO
224KO
312OK
312OK
H312OK
412KO
420KO
K424KO
L412KO
M412KO
412KO

thank oyu in advance for your help

3 ACCEPTED SOLUTIONS
Ahmedx
Super User
Super User

pls try this

Column = 
VAR _Result = CALCULATE(DISTINCTCOUNT('Table'[Value]),ALLEXCEPT('Table','Table'[Group]))
RETURN
IF(_Result=1,"OK","KO")

Screenshot_1.png

View solution in original post

Ahmedx
Super User
Super User

pls try this

Column = 
VAR _Result = CALCULATE(DISTINCTCOUNT('Table'[Value]),ALLEXCEPT('Table','Table'[Group]))
RETURN
IF(_Result=1,"OK","KO")

Screenshot_1.png

View solution in original post

danextian
Super User
Super User

Hi @vnqt ,

 

Try this as a calc column:

Coherence =
IF (
    CALCULATE (
        DISTINCTCOUNT ( 'Table'[Value] ),
        ALLEXCEPT ( 'Table', 'Table'[Group] )
    ) > 1,
    "KO",
    "OK"
)

danextian_0-1695047078997.png

 










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 or follow my page on Facebook @DAXJutsuPBI.

View solution in original post

3 REPLIES 3
danextian
Super User
Super User

Hi @vnqt ,

 

Try this as a calc column:

Coherence =
IF (
    CALCULATE (
        DISTINCTCOUNT ( 'Table'[Value] ),
        ALLEXCEPT ( 'Table', 'Table'[Group] )
    ) > 1,
    "KO",
    "OK"
)

danextian_0-1695047078997.png

 










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 or follow my page on Facebook @DAXJutsuPBI.
Ahmedx
Super User
Super User

pls try this

Column = 
VAR _Result = CALCULATE(DISTINCTCOUNT('Table'[Value]),ALLEXCEPT('Table','Table'[Group]))
RETURN
IF(_Result=1,"OK","KO")

Screenshot_1.png

Ahmedx
Super User
Super User

pls try this

Column = 
VAR _Result = CALCULATE(DISTINCTCOUNT('Table'[Value]),ALLEXCEPT('Table','Table'[Group]))
RETURN
IF(_Result=1,"OK","KO")

Screenshot_1.png

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!

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

Find out what's new and trending in the Fabric community.