Microsoft Fabric Community Conference 2025, March 31 - April 2, Las Vegas, Nevada. Use code FABINSIDER for a $400 discount.
Register nowThe Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.
I'm looking for a Measure that will look up a value in my Goals table based on multiple criteria.
So for Bobby, I would need to look up in the Goals table, by his Region, and then Team, and specific Metric, in this case "Gas", and it should return the value of 150.
I've tried different variations of filters, but still am unable to get it to work. The 2 tables have a relationship linked by Team. But I'm needing a measure to bring in the Value of the Goal for a second part of a calculation using VAR statements.
Sales Team
Sales | Region | Team |
Bobby | West | Team 2 |
John | East | Team 2 |
Robert | South | Team 2 |
Vicenzio | West | Team 3 |
Robert | East | Team 3 |
Melissa | South | Team 9 |
Michael | East | Team 5 |
Nancy | South | Team 4 |
Goals
Team | Region | Metric | Goal |
Team 2 | West | Gas | 150 |
Team 2 | South | Sales | 1500 |
Team 3 | East | Gas | 150 |
Team 3 | West | Sales | 2000 |
Team 4 | South | Gas | 200 |
Team 4 | West | Sales | 1600 |
Team 5 | East | Gas | 175 |
Team 5 | South | Sales | 1500 |
Solved! Go to Solution.
Hi @Anonymous ,
Here are the steps you can follow:
1. Create measure.
Measure =
var _select=SELECTEDVALUE('Goals'[Metric])
return
CALCULATE(SUM('Goals'[Goal]),FILTER(ALL('Sales Team'),'Sales Team'[Sales]=MAX('Sales Team'[Sales])&&'Sales Team'[Region]=MAX('Goals'[Region])&&'Sales Team'[Team]=MAX('Sales Team'[Team])&&MAX('Goals'[Metric])=_select))
2. Use the [Metric] column of the [Goals] table as the slicer
3. Result:
Select the slicer as Gas, and the specified Sales will display the values under Team, Region and Gas.
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Hi @Anonymous ,
Here are the steps you can follow:
1. Create measure.
Measure =
var _select=SELECTEDVALUE('Goals'[Metric])
return
CALCULATE(SUM('Goals'[Goal]),FILTER(ALL('Sales Team'),'Sales Team'[Sales]=MAX('Sales Team'[Sales])&&'Sales Team'[Region]=MAX('Goals'[Region])&&'Sales Team'[Team]=MAX('Sales Team'[Team])&&MAX('Goals'[Metric])=_select))
2. Use the [Metric] column of the [Goals] table as the slicer
3. Result:
Select the slicer as Gas, and the specified Sales will display the values under Team, Region and Gas.
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the February 2025 Power BI update to learn about new features.
User | Count |
---|---|
85 | |
79 | |
53 | |
39 | |
36 |
User | Count |
---|---|
100 | |
85 | |
47 | |
46 | |
44 |