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
jayantatra
Frequent Visitor

Parameter value is not populated correctly in new table using new column

I have defined a new parameter as below.

FG = GENERATESERIES(0, 100, 0.1)
FG Value = SELECTEDVALUE('FG'[FG])
 
However I am trying to call this value in another table using switch function, but the value shown is blank.
Column in another table : 
FG Value = SWITCH(TRUE(), CALCULATE(VALUES('Input data'[key new]))="Finished goods",'FG'[FG Value],1)
1 ACCEPTED SOLUTION
v-rzhou-msft
Community Support
Community Support

Hi @jayantatra ,

 

Here I suggest you to create a measure instead of a calculated column in your data table. Power BI doesn't support us to show dynamic results catched by SELECTEDVALUE() function in calculated column, so it will return blank.

Measure:

M_FG Value =
SWITCH (
    TRUE (),
    CALCULATE ( MAX ( 'Input data'[key new] ) ) = "Finished goods", 'FG'[FG Value],
    1
)

Result is as below.

vrzhoumsft_0-1686105714927.png

 

Best Regards,
Rico Zhou

 

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

View solution in original post

3 REPLIES 3
v-rzhou-msft
Community Support
Community Support

Hi @jayantatra ,

 

Here I suggest you to create a measure instead of a calculated column in your data table. Power BI doesn't support us to show dynamic results catched by SELECTEDVALUE() function in calculated column, so it will return blank.

Measure:

M_FG Value =
SWITCH (
    TRUE (),
    CALCULATE ( MAX ( 'Input data'[key new] ) ) = "Finished goods", 'FG'[FG Value],
    1
)

Result is as below.

vrzhoumsft_0-1686105714927.png

 

Best Regards,
Rico Zhou

 

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

One more request pertaining the post, can it be converted to column somehow, as the calculation of totals is not done correctly in measure

.

 

Thank You @v-rzhou-msft , it is working perfectly 

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

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

MayPowerBICarousel1

Power BI Monthly Update - May 2024

Check out the May 2024 Power BI update to learn about new features.