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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Nazar11
Regular Visitor

Measure development

Hi all, 

 

I am seeking support with creating a measure: 

ACCEPTANCE CRITERIA: 

calcualte the values in the project_details table from the total Value column when the realization start month is 2025. In the project details table i have multiple years. also the project must be in execution phase, information also stored in project details. Finally I need to apply the right exchange rate within the right year. 

 

PROBLEM STATEMENT: 

The project_details table contains project currencies that may vary. I need to find the correct exchange rate and convert the values to the appropriate currency using the exchange_rate table.

 

MATERIALS: 

i have three table:

  1. project_details
Project NumberRealization Start MonthPhaseProject Currency Total Value
002540Jan 2025ExecutionEUR25489
002536Sep 2024IdeationGBP98651651
002533Sep 2024ExecutionUSD51984651
002492Nov 2024ExecutionCHF4684621
002488Nov 2024IdeationEUR30664202
002487Jan 2025IdeationGBP27395241,6
002486Jan 2025ExecutionUSD24126281,2
002485Jan 2025ExecutionCHF20857320,8
002484Sep 2024ExecutionEUR17588360,4
  1. ASP_versions
AOP Year & TierYear
2023 Tier 02023
2023 Tier 0a2023
2023 Tier 0b2023
2024 Tier 0c2024
2024 Tier 12024
2024 Tier 1a2024
2025 Tier 1b2025
2025 Tier 1c2025
2025 Tier 22025
  1. exchange_rate
Currency FromCurrency ToExchange RateRate Period
EURCHF1,11792024
EUREUR1,00002024
EURGBP0,88952024
EURUSD1,16172024
EURCHF1,18602024
EUREUR1,00002025
EURGBP0,88652025
EURUSD1,22102025
EURCHF1,09512025

 

this is the current measure: 

Total Values =
SUMX(
    FILTER(
        project_details,
        project_details[Realization Start Month] >= DATE(2025, 1, 1) &&
        project_details[Realization Start Month] <= DATE(2025, 12, 31) &&
        project_details[Phase] = "Execution"
    ),
    VAR ProjectCurrency = project_details[Project Currency]
    VAR ExchangeRate =
        LOOKUPVALUE(
            exchange_rates[Exchange Rate],
            exchange_rates[Rate Period], [Selected Year ASP],
            exchange_rates[Currency To], ProjectCurrency
        )
    RETURN project_details[Total Value] * ExchangeRate
)
 
Selected Year ASP =
VALUES(
    ASP_versions[Year]
)
 
FINAL RESULT: 
 
I create a graph bar pulling the total value measure and have two filters 
  1. exchange_rate[Currency To] -- where I can toggle between different exchange rates 
  2. ASP_versions[AOP Year & Tier] -- where I select the right Tier
2 REPLIES 2
Anonymous
Not applicable

Hi @Nazar11 ,

 

Thanks to BeaBF  for their interest in this issue. I have some other thoughts to add:

(1) We can create a table.

project_details_2025 = FILTER(
        project_details,
        project_details[Realization Start Month] >= DATE(2025, 1, 1) &&
        project_details[Realization Start Month] <= DATE(2025, 12, 31) &&
        project_details[Phase] = "Execution"
    )

(2) We can create a measure.

Measure =
VAR _value =
    SUM ( 'project_details_2025'[Total Value] )
VAR _rate =
    CALCULATE (
        SUM ( 'exchange_rate'[Exchange Rate] ),
        FILTER (
            ALL ( 'exchange_rate' ),
            [Currency To] = SELECTEDVALUE ( 'exchange_rate'[Currency To] )
                && [Rate Period] = SELECTEDVALUE ( ASP_versions[Year] )
        )
    )
RETURN
    _value * _rate

(3) Then the result is as follows.

vtangjiemsft_0-1727248133886.png

Best Regards,

Neeko Tang

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

BeaBF
Super User
Super User

@Nazar11 Hi! Try adjust the measure like:

 

Total Values =
SUMX(
FILTER(
project_details,
YEAR(project_details[Realization Start Month]) = 2025 &&
project_details[Phase] = "Execution"
),
VAR ProjectCurrency = project_details[Project Currency]
VAR SelectedCurrencyTo = SELECTEDVALUE(exchange_rate[Currency To])
VAR SelectedYear = SELECTEDVALUE(ASP_versions[Year])
VAR ExchangeRate =
LOOKUPVALUE(
exchange_rate[Exchange Rate],
exchange_rate[Currency From], ProjectCurrency,
exchange_rate[Currency To], SelectedCurrencyTo,
exchange_rate[Rate Period], SelectedYear
)
RETURN project_details[Total Value] * ExchangeRate
)

 

BBF

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

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

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.