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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
UBComma
Helper III
Helper III

Calculated Column won't take value from Parameter Slicer

I have been staring at this for hours and can't figure out what I'm doing wrong. I created a simple test PBI file to demonstrate the issue I'm having with my model. I'm trying to do a calculation of Future Value where the amount of the Present Value is influenced by a parameter slicer. The calculated table looks like this:

 

 

 

Test Table = 
    ADDCOLUMNS(
        Years,
        "Calculated Value",
            FV(.5,Years[Year] - MIN( Years[Year]),1,-[Test1])
            )

 

 

 

The Measure [Test1] is a simple calculation: 

Test1 =
DIVIDE ( 100, [Denominator Value] )
 
and the Denominator value is set by a parameter slider with numbers 1-20 and the auto-created parameter measure that reads:
Denominator Value =
SELECTEDVALUE ( 'Denominator'[Denominator], 2 )
 
I am referencing a Years table in the table created above, that is also a simple table created this way:
Years = GENERATESERIES(2022, 2022+15, 1)
 
When I create any visualization, for example a line chart, the visualization calculated based on the alternate value of the parameter measure ("2" shown above) and will not change if I adjust the parameter slider.
 
Any thoughts on why this isn't working and how to fix it? I will be happy to upload my test PBIX file if that helps.
 
 
 


1 ACCEPTED SOLUTION
DataInsights
Super User
Super User

@UBComma,

 

Calculated columns and calculated tables don't recognize user selections in report visuals. Try rewriting the DAX as a measure:

 

Calculated Value = 
VAR vMinYear =
    CALCULATE ( MIN ( Years[Year] ), ALL ( Years[Year] ) )
VAR vCurrentYear =
    MAX ( Years[Year] )
VAR vResult =
    FV ( .5, vCurrentYear - vMinYear, 1, DIVIDE ( 100, - [Denominator Value] ) )
RETURN
    vResult

 

DataInsights_1-1651420339789.png

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




View solution in original post

1 REPLY 1
DataInsights
Super User
Super User

@UBComma,

 

Calculated columns and calculated tables don't recognize user selections in report visuals. Try rewriting the DAX as a measure:

 

Calculated Value = 
VAR vMinYear =
    CALCULATE ( MIN ( Years[Year] ), ALL ( Years[Year] ) )
VAR vCurrentYear =
    MAX ( Years[Year] )
VAR vResult =
    FV ( .5, vCurrentYear - vMinYear, 1, DIVIDE ( 100, - [Denominator Value] ) )
RETURN
    vResult

 

DataInsights_1-1651420339789.png

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.