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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Digger
Post Patron
Post Patron

Get EOMONTH Currency RATE for accumulated balance

HOW Get EOMONTH Currency RATE for accumulated balance?

Digger_0-1740596935375.png

_Sum_EUR_accum =
CALCULATE(
    [_Sum_EUR],
    FILTER(
        ALL('__Calendar'[Date]),
        '__Calendar'[Date] <= MAX('__Calendar'[Date])
    )
)
_Sum_Currency_accum =
CALCULATE(
    [_Sum_Currency],
    FILTER(
        ALL('__Calendar'[Date]),
        '__Calendar'[Date] <= MAX('__Calendar'[Date])
    )
)

_LastMday_currency_rate =
VAR CurrentDate = MAX('__Calendar'[Date])  -- Get the current date from the calendar
VAR CurrentCode = MAX(Table1[Currency_Code])  -- Get the current currency code

RETURN
CALCULATE(
    MAX(PP_Currency_rate[amount_2]),  -- Get the latest available rate  EACH MONTH LAST DAY (EOMONTH)
    FILTER(
        PP_Currency_rate,
        PP_Currency_rate[name_2] = CurrentCode &&
        PP_Currency_rate[date] = CurrentDate  -- Take the latest available rate LATEST SELECTED DAY IN MONTH SELECTED IN DATE SLICER
    ),
    ALL(Table1)  -- Ignore accumulated balance filters
)
_Sum_EUR_RECALCULATED = DIVIDE([_Sum_Currency_accum],[_LastMday_currency_rate])
 
2 REPLIES 2
Anonymous
Not applicable

Hi @Digger 

 

There is nothing wrong with your measures, I think the blank portion of the matrix is due to the fact that you are using date fields in both the rows and columns causing a change in the calculated range of the measures.

vxianjtanmsft_0-1740635868274.png

 

I would suggest that you consider removing the date fields from the columns in the matrix visual. Set the slicer style to “Less than or equal to” in the Visual Formatting settings, and view the currency rate for the accumulated balance up to the selected year.

vxianjtanmsft_2-1740636155479.png

vxianjtanmsft_1-1740635933172.png

 

Best Regards,
Jarvis Tang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

@Anonymous I cant remove date fields from the columns in the matrix visual, also i need add one more field and slicer KODAS_ZS which also does not shown in matrix visual. But i need see ALL info!!

Digger_0-1740637172276.png


because 0 zeroes show on calculating Sum_EUR, but on Sum_Currency it can be not equal to 0 (because on wrong rate used when countd Sum_Eur), that what i need to find!!

Also Values should be shown for all fields, but here some missing

Digger_1-1740637463891.png

 

 

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.