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

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.