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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

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
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.

AugPowerBI_Carousel

Power BI Monthly Update - August 2024

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

August Carousel

Fabric Community Update - August 2024

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