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
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
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel

Power BI Monthly Update - May 2024

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

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.