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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
antlufc
Frequent Visitor

Column Refers to column in same table

Hi All,

 

I have attached a Power Bi data tabel with the fileds i have to try and get to the expected result as per below. 

I would like a DAX column that finds the Transaction type that refers to the SubscriptionVersion 1 based upon the customer reference.  I would like this result to be in ever row in the new column expected result below:

antlufc_0-1664351318212.png

 

https://1drv.ms/u/s!AivZWzcfJJzngR4sM0fFXflWaQAx?e=IIoRQk 

1 ACCEPTED SOLUTION
tamerj1
Super User
Super User

HI @antlufc 
Please refer to attached sample file with the solution

1.png

Required Result = 
VAR CurrentCustomerTable = 
    CALCULATETABLE ( First_Transaction_Type, ALLEXCEPT ( First_Transaction_Type, First_Transaction_Type[Customer Reference] ) )
VAR FirstVersion = MINX ( CurrentCustomerTable, First_Transaction_Type[SubscriptionVersion Number] )
RETURN
    MAXX (
        FILTER ( CurrentCustomerTable, First_Transaction_Type[SubscriptionVersion Number] = FirstVersion ),
        First_Transaction_Type[Transaction type]
    )

View solution in original post

2 REPLIES 2
tamerj1
Super User
Super User

HI @antlufc 
Please refer to attached sample file with the solution

1.png

Required Result = 
VAR CurrentCustomerTable = 
    CALCULATETABLE ( First_Transaction_Type, ALLEXCEPT ( First_Transaction_Type, First_Transaction_Type[Customer Reference] ) )
VAR FirstVersion = MINX ( CurrentCustomerTable, First_Transaction_Type[SubscriptionVersion Number] )
RETURN
    MAXX (
        FILTER ( CurrentCustomerTable, First_Transaction_Type[SubscriptionVersion Number] = FirstVersion ),
        First_Transaction_Type[Transaction type]
    )

Superb, worked perfectly. 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

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