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
Power_Krille
Regular Visitor

Select a specific value from a table

Hi, 

I have created a messure from one table and i want to use that output of the messure to get a specific number from another table;

Lets say that my messure shows 2 then i want to use below table to get Value 1000. 

FromToValue
051000
6102000
11153000

 

I have tried with SELECTEDVALUE() and i get this result, it almost works,
"Picked Value = IF([A]>= SELECTEDVALUE('Value Table'[Fr]) && [A]<= SELECTEDVALUE('Value Table'[To]),SELECTEDVALUE('Value Table'[value]))"

Picked ValueAvalue
100021000
 22000
 23000

 


But when removing column A and Value column "Picked Value" ends up empty

Picked Value
 


How can i solve this
Regards
Christian

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Power_Krille ,

SELECTEDVALUE function not suitable to handle the row context that mixed with multiple records. (it will return blank when you use it on aggregate multiple row contexts)

If you want to use these expression without column A, you can try to create a variable table with current category and correspond A value and use them to get corresponding Value from the segmentation table, then you can do aggregate with these results:

Picked Value =
VAR summary =
    SUMMARIZE (
        ALLSELECTED ( Table ),
        [Category],
        [A],
        "Result",
            MAXX (
                FILTER (
                    ALLSELECTED ( 'Value Table' ),
                    'Value Table'[Fr] <= currVal
                        && 'Value Table'[To] >= currVal
                ),
                [value]
            )
    )
RETURN
    SUMX ( summary, [Result] )

Regards,

Xiaoxin Sheng

View solution in original post

1 REPLY 1
Anonymous
Not applicable

Hi @Power_Krille ,

SELECTEDVALUE function not suitable to handle the row context that mixed with multiple records. (it will return blank when you use it on aggregate multiple row contexts)

If you want to use these expression without column A, you can try to create a variable table with current category and correspond A value and use them to get corresponding Value from the segmentation table, then you can do aggregate with these results:

Picked Value =
VAR summary =
    SUMMARIZE (
        ALLSELECTED ( Table ),
        [Category],
        [A],
        "Result",
            MAXX (
                FILTER (
                    ALLSELECTED ( 'Value Table' ),
                    'Value Table'[Fr] <= currVal
                        && 'Value Table'[To] >= currVal
                ),
                [value]
            )
    )
RETURN
    SUMX ( summary, [Result] )

Regards,

Xiaoxin Sheng

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