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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
CJ_96601
Helper V
Helper V

Lookup Value

Below table refers:

 

 

Company Year 1Year 2Year 3
Option 13.00%3.50%4.50%
Option 25.00%6.50%7.00%
Option 34.00%4.50%5.50%

 

How to create measure (lookup value) like in excel where if Year 1 and Option 1 will yield 3%

 

Year 2 and Option 2 = 6.5%

Year 2 Option 1 = 3.5%

 

Thanks

3 REPLIES 3
Anonymous
Not applicable

Hi, @CJ_96601 

 

Based on your description, I have created some measures to achieve the effect you are looking for. Following picture shows the effect of the display.

 

Convert the chart format to this:

vyaningymsft_1-1709191217787.png
Excel-like visual effects can be realized using a matrix:

vyaningymsft_0-1709191217785.png

The final result:

vyaningymsft_2-1709191744803.png

Measure:

 

getValue =

VAR SelectedYear =

    SELECTEDVALUE ( 'Year'[year] )

VAR SelectedCompany =

    SELECTEDVALUE ( 'company'[company] )

RETURN

    CALCULATE (

        SUM ( 'Table'[Value] ),

        'Table'[Year] = SelectedYear

            && 'Table'[Company] = SelectedCompany

    )

 


Best Regards,
Yang
Community Support Team

 

If there is any post helps, then please consider Accept it as the solution  to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

How to get your questions answered quickly --  How to provide sample data in the Power BI Forum

 

 

qqqqqwwwweeerrr
Super User
Super User

Hi @CJ_96601 

 

if this is your input table:

Company Year 1Year 2Year 3
Option 13.00%3.50%4.50%
Option 25.00%6.50%7.00%
Option 34.00%4.50%5.50%

then just unpivot table and you desired view can be achived 

 

Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
Check for more intersing solution here: https://www.youtube.com/@letssolveproblem

Regards

Good evening, 

 

I will give another table, maybe my example and requirements are not clear.

 

DS Table

YearBUKPIItemData
1/1/20243 G6.00%
1/1/20241ThresholdG3.00%
1/1/20242ThresholdG5.00%
1/1/20243ThresholdG4.00%
1/1/20244ThresholdH24.00%
1/1/20245ThresholdH38.00%
1/1/20241StretchH57.00%
1/1/20242StretchH11.00%
1/1/20243StretchB18.00%
1/1/20244StretchB37.00%
1/1/20245StretchB32.00%
1/1/20241TargetB49.00%
1/1/20242TargetA16.00%
1/1/20243TargetA8.00%
1/1/20244TargetA12.00%

 

 

Syntax, 

 

Sample # 1

 

If "Year" (from DS Table)  is equal to year column (calendar - assuming there is a calendar table and selected year is 2024

 

If "BU" (from DS Table)  is equal to BU column (assuming there is a BU table, let say "3" is selected

 

Filter "KPI" from DS Table) = "  "

 

Filter "Item" from DS Table = "B"

 

Result must be 18%

 

-------------------------------------------------

sample # 2

 

If "Year" (from DS Table)  is equal to year column (calendar - assuming there is a calendar table and selected year is 2024

 

If "BU" (from DS Table)  is equal to BU column (assuming there is a BU table, let say "3" is selected

 

Filter "KPI" from DS Table) = "Stretch"

 

Filter "Item" from DS Table = "G"

 

Result must be 6%

 

 

 

 

 

Regards, 

 

 

Obet

 

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.