cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
ivyhai
Post Patron
Post Patron

DAX for Calulation column

I have column A, I want to create a 'calculation column' B.   The calculation function please find from B's calculation. 

 

Thanks!

PBI.PNG

1 ACCEPTED SOLUTION
v-cherch-msft
Microsoft
Microsoft

Hi @ivyhai 

You may use below dax to get the calculated column.

Column =
VAR a =
    PRODUCTX (
        FILTER ( Data, Data[Index] <= EARLIER ( Data[Index] ) - 1 ),
        Data[A]
    )
VAR b = Data[A]
RETURN
    IF ( Data[Index] = 1, Data[A] * 1, a * b )

1.png

Regards,

Community Support Team _ Cherie Chen
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

1 REPLY 1
v-cherch-msft
Microsoft
Microsoft

Hi @ivyhai 

You may use below dax to get the calculated column.

Column =
VAR a =
    PRODUCTX (
        FILTER ( Data, Data[Index] <= EARLIER ( Data[Index] ) - 1 ),
        Data[A]
    )
VAR b = Data[A]
RETURN
    IF ( Data[Index] = 1, Data[A] * 1, a * b )

1.png

Regards,

Community Support Team _ Cherie Chen
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

November Power BI Update 768x460.png

Check it Out!

Click here to read more about the November 2021 Updates!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.