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
2022 Release Wave 1 760x460.png

2022 Release Wave 1 Plan

Power Platform release plan for the 2022 release wave 1 describes all new features releasing from April 2022 through September 2022.

Power BI December 2021 Update_carousel 768x460.jpg

Check it Out!

Click here to read more about the December 2021 Updates!

User Group Leader Meeting January 768x460.png

Calling all User Group Leaders!

Don't miss the User Group Leader meetings on January, 24th & 25th, 2022.

Jan 2022 Dev Camp 768x460 copy.png

Power BI Dev Camp- January 27th, 2022

Mark your calendars and join us for our next Power BI Dev Camp!

Top Solution Authors
Top Kudoed Authors