cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
dancarr22 Helper III
Helper III

Equivalent of array forumla in Excel - PRODUCT - Calculating linked returns

Hello,

 

We use an array formula to calculate returns in Excel.  Please see details below.

How cna this be replicated in Power BI?

 

Thanks,

Dan

Capture.PNG

1 ACCEPTED SOLUTION

Accepted Solutions
Microsoft
Microsoft

Re: Equivalent of array forumla in Excel - PRODUCT - Calculating linked returns

@dancarr22,

Firstly, create a column in your table.

return2 = 1+Table1[Returns(%)]/100

secondly, create a measure using DAX below in your table.

Measure = 

VAR DATECOL= MAX(Table1[Date])
RETURN (CALCULATE(
        PRODUCT(
           Table1[return2]
            ),
            FILTER(
                Table1,
                Table1[Date]<=DATECOL )
               )-1)*100

1.JPG


Regards,
Lydia

Community Support Team _ Lydia Zhang
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

2 REPLIES 2
Microsoft
Microsoft

Re: Equivalent of array forumla in Excel - PRODUCT - Calculating linked returns

@dancarr22,

Firstly, create a column in your table.

return2 = 1+Table1[Returns(%)]/100

secondly, create a measure using DAX below in your table.

Measure = 

VAR DATECOL= MAX(Table1[Date])
RETURN (CALCULATE(
        PRODUCT(
           Table1[return2]
            ),
            FILTER(
                Table1,
                Table1[Date]<=DATECOL )
               )-1)*100

1.JPG


Regards,
Lydia

Community Support Team _ Lydia Zhang
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

dancarr22 Helper III
Helper III

Re: Equivalent of array forumla in Excel - PRODUCT - Calculating linked returns

This worked!  Thanks Lydia!  

Helpful resources

Announcements
‘Better Together’ T-Shirt Contest – Winner Announced!

‘Better Together’ T-Shirt Contest – Winner Announced!

And the winner is...

Announcing the New Spanish Forum

Announcing the New Spanish Forum

Do you need help in Spanish? Check out our new Spanish community section.

April 2020 Community Highlights

April 2020 Community Highlights

Info on our Super Users, MBAS content and badges, and updates to our support articles. - Read the full Community Highlights.

MBAS Gallery 2020

MBAS Gallery 2020

Watch Microsoft Business Applications Summit sessions on-demand.

Top Solution Authors
Top Kudoed Authors