Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.

Reply
martipe1
Helper II
Helper II

How to use INDEX DAX function in a calculated column?

I'm a newbie in PowerBi.

 

I have an excel report trying to convert to Power Bi, my last column in Excel file is a calculated using Index-match functions, but I can't figure it out how to convert it to a calculated column in Power BI.

My excel formula is:

=IF([@CURRENCY] = "PES",[@[AMOUNT]], [@[AMOUNT]]*INDEX(L:L,MATCH(1,(MID([@DATE],5,2)=MID(E:E,5,2))*(LEFT([@DATE],4)=LEFT(E:E,4))*(G:G="PES"),0)))

Thanks in advance for your help

 

5 REPLIES 5
martipe1
Helper II
Helper II

Anybody that can help me out?

martipe1
Helper II
Helper II

Thank you very much for your answer.

 

What I see your answer does is multiplies the amount by the sum of all amounts where the currency equals "PES"

What I'm attemping to do is to multiply the amount by the exchange rate (columns L:L) where the currency matches "PES" (G:G) and the month and year of that exchange rate matches the date of the amount

Any suggestion?

@martipe1 

Sharing a dummy Power BI file representing your scenario would be beneficial. You can save the Power BI file on Google Drive or any other cloud storage platform and provide the link here. Kindly ensure that permission is granted to open the file.

Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

Thank you for your answer.

I uploaded a dummy Excel and Power BI files. The excel file has the formula I want to reproduce in Power Bi

Dummy files

 

Thanks!!

Fowmy
Super User
Super User

@martipe1 
Please try:

NewColumn =
IF (
    'YourTable'[CURRENCY] = "PES",
    'YourTable'[AMOUNT],
    'YourTable'[AMOUNT]
        * CALCULATE (
            SUM ( 'YourTable'[AMOUNT] ),
            FILTER (
                'YourTable',
                MID ( 'YourTable'[DATE], 5, 2 ) = MID ( 'YourTable'[DATE], 5, 2 )
                    && LEFT ( 'YourTable'[DATE], 4 ) = LEFT ( 'YourTable'[DATE], 4 )
                    && 'YourTable'[CURRENCY] = "PES"
            )
        )
)



Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.