cancel
Showing results for 
Search instead for 
Did you mean: 

Fabric is Generally Available. Browse Fabric Presentations. Work towards your Fabric certification with the Cloud Skills Challenge.

Reply
vnqt
Helper IV
Helper IV

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."
Connect to me on LinkedIn || Need consulting? Hire me for a Power BI gig on UpWork.
Learn with me on YouTube @PowerBITambayan.

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."
Connect to me on LinkedIn || Need consulting? Hire me for a Power BI gig on UpWork.
Learn with me on YouTube @PowerBITambayan.
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
PBI November 2023 Update Carousel

Power BI Monthly Update - November 2023

Check out the November 2023 Power BI update to learn about new features.

Community News

Fabric Community News unified experience

Read the latest Fabric Community announcements, including updates on Power BI, Synapse, Data Factory and Data Activator.

Dashboard in a day with date

Exclusive opportunity for Women!

Join us for a free, hands-on Microsoft workshop led by women trainers for women where you will learn how to build a Dashboard in a Day!

Power BI Fabric Summit Carousel

The largest Power BI and Fabric virtual conference

130+ sessions, 130+ speakers, Product managers, MVPs, and experts. All about Power BI and Fabric. Attend online or watch the recordings.

Top Solution Authors
Top Kudoed Authors