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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
vzbkb1
Helper I
Helper I

DAX increate a column grouping for a column and providing the data for other

I am trying to create a new column in DAX that will give the result of the column Status for the type “Chain” with records with the same ID.  For example, for this table

 

Name

Type

ID

Status

a

Chain

21

Open

b

Job

21

Closed

c

Job

21

Closed

d

Job

21

Open

e

Chain

22

Closed

f

Job

22

Closed

g

Job

22

Closed

h

Job

22

Closed

 

The result will be

 

Name

Type

ID

Status

NewChain Status

a

Chain

21

Open

Open

b

Job

21

Closed

Open

c

Job

21

Closed

Open

d

Job

21

Open

Open

e

Chain

22

Closed

Closed

f

Job

22

Closed

Closed

g

Job

22

Closed

Closed

h

Job

22

Closed

Closed

 

Can you help me?

1 ACCEPTED SOLUTION
tamerj1
Super User
Super User

Hi @vzbkb1 
Please try

NewChain Status =
MAXX (
    FILTER (
        CALCULATETABLE ( TableName, ALLEXCEPT ( TableName, TableName[ID] ) ),
        TableName[Type] = "Chain"
    ),
    Chain[Status]
)

View solution in original post

2 REPLIES 2
vzbkb1
Helper I
Helper I

Thanks a lot it works great 🙂

tamerj1
Super User
Super User

Hi @vzbkb1 
Please try

NewChain Status =
MAXX (
    FILTER (
        CALCULATETABLE ( TableName, ALLEXCEPT ( TableName, TableName[ID] ) ),
        TableName[Type] = "Chain"
    ),
    Chain[Status]
)

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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

Top Solution Authors