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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Draginko
Helper I
Helper I

Inflation value based on selection on parameter table

Hello,

 

I need to get the value of projected salary affected by inflation rate based on the selection user selected with slicer where is a numeric range parameter table, showing how far in the future he/she wants to see (up to 5 years, based on MMF)

So related to this, there are basically three tables imporant:
1. InflationForcast table with 3 columns with this example of structure structure:

CountryYearRate
Australia20243.10%
Australia20254.00%
Australia20263.40%
Australia20272.70%
Australia20282.60%


2. Main table with name output, where of interest is a column with relevant Country names and TCoW per FTE column
3. Parameter table, generated via this code:

Years of Inflation = GENERATESERIES(0, 5, 1), and this is value: 
Years of Inflation Value = SELECTEDVALUE('Years of Inflation'[Years of Inflation], 5)

The plan is, that if e.g. user select modelling for 3 years, I need to get the projected salary (or TCoW in this case) for Australia for 2024 up to 2026.
In this example the logic should be like this:

Starting salary is e.g. 100.000.
2024 > 100,000 * 3.1% = 103,100
2025 > 103,100 * 4.0% = 107,224
2026 > 107,224 * 3.4% = 110,870

So the displayed salary in this case would be the last value > 110,870.

On the report page there may be additional slicers, e.g. Region/Subregion for Countries, and slicer for Role or Job Family / Job Sub Family.
Have spent whole day trying to figure this out, but have been struggling with taking in account the value selected in Years of Inflation Value, e.g. this measure for returning the total inflation rate per selected years was always returning only the value in given year:

 

Cumulative Inflation Rate = 
VAR __SelectedYears = 
    SELECTCOLUMNS(
        FILTER(
            'Years of Inflation', 
            'Years of Inflation'[Years of Inflation] <= MAX('Years of Inflation'[Years of Inflation])
            ), 
        "Year", 
        'Years of Inflation'[Years of Inflation Value] + YEAR(TODAY())
    )

VAR __SelectedCountries = VALUES('output'[Country])

Var __Result = 
    SUMX(
        __SelectedCountries,
        PRODUCTX(
            __SelectedYears,
            LOOKUPVALUE(
                InflationForecast[Rate],
                InflationForecast[Country], [Country],
                InflationForecast[Year], [Year]
            ) + 1
        ) - 1
    )

RETURN
    __Result

 

So it seems I got it wrong. Any suggestion here would be very appreciated. Please let me know if you need more information from my end.
Thanks a lot!

Matus

1 ACCEPTED SOLUTION
Draginko
Helper I
Helper I

Okay, after some time I have figure it out, and this measure is working fine just in case somebody would be interested into it:

Projected Salary = 
VAR __SelectedYears = SELECTEDVALUE('Years of Inflation'[Years of Inflation])
VAR __SelectedCountry = SELECTEDVALUE('output'[Country])
VAR __SelectedRole = SELECTEDVALUE('output'[Role])

VAR __vInflationRates = 
    FILTER(
        ALL('InflationForecast'),
        'InflationForecast'[Country] = __SelectedCountry && 
        'InflationForecast'[Year] > YEAR(TODAY()) && 
        'InflationForecast'[Year] <= YEAR(TODAY()) + __SelectedYears
    )
VAR __BaseSalary = 
    CALCULATE(
        SUM('output'[TCOW per FTE]),
        'output'[Role] = __SelectedRole
    )

VAR ProjectedSalary = 
    __BaseSalary * PRODUCTX(
        __vInflationRates,
        1 + 'InflationForecast'[Rate]
    )
    
VAR __Result =
    IF(
        __SelectedYears = 0,
        __BaseSalary,
        IF(
            ISBLANK(__SelectedYears) || ISBLANK(__SelectedCountry) || ISBLANK(__SelectedRole),
            BLANK(),
            ProjectedSalary
        )
    )

RETURN
    __Result

View solution in original post

1 REPLY 1
Draginko
Helper I
Helper I

Okay, after some time I have figure it out, and this measure is working fine just in case somebody would be interested into it:

Projected Salary = 
VAR __SelectedYears = SELECTEDVALUE('Years of Inflation'[Years of Inflation])
VAR __SelectedCountry = SELECTEDVALUE('output'[Country])
VAR __SelectedRole = SELECTEDVALUE('output'[Role])

VAR __vInflationRates = 
    FILTER(
        ALL('InflationForecast'),
        'InflationForecast'[Country] = __SelectedCountry && 
        'InflationForecast'[Year] > YEAR(TODAY()) && 
        'InflationForecast'[Year] <= YEAR(TODAY()) + __SelectedYears
    )
VAR __BaseSalary = 
    CALCULATE(
        SUM('output'[TCOW per FTE]),
        'output'[Role] = __SelectedRole
    )

VAR ProjectedSalary = 
    __BaseSalary * PRODUCTX(
        __vInflationRates,
        1 + 'InflationForecast'[Rate]
    )
    
VAR __Result =
    IF(
        __SelectedYears = 0,
        __BaseSalary,
        IF(
            ISBLANK(__SelectedYears) || ISBLANK(__SelectedCountry) || ISBLANK(__SelectedRole),
            BLANK(),
            ProjectedSalary
        )
    )

RETURN
    __Result

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.

Top Solution Authors