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

Get certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now

Reply
bschmiedeler
Frequent Visitor

How do I return values from a selected row in a table?

I have a data table called "Goals" in a Power BI Report. A manager is going to put in data for different Businesses (see below).

 

c1.png

Each row will have the primary key for the business and then a bunch of attributes, including name, and all the other columns are goals that the business has. So Business 1 has committed to having 1000 trips, for example. This is just something that the manager sees and has to enter manually.

 

There is a different worksheet with a dropdown (slicer is what I used) where businesses can choose their business.

 

c2.png

When a business is chosen my programming needs to do the following:

 

Refer back to the table above and "grab" the values for each goal (like Trips).

Run an SQL over the Trips table that will pass in the key (Business ID) and count how many trips were actually completed.

 

From these two numbers I want two vertical bars, one for goal and one for actual. 

 

Iterate for every goal.

 

I have no idea even where to start on this one.

 

Thanks!

 

 

4 REPLIES 4
Greg_Deckler
Super User
Super User

I feel like this post is incomplete...


Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
Power BI Cookbook Third Edition (Color)

DAX is easy, CALCULATE makes DAX hard...

My post got mangled, half the text and two pictures were lost. I have updated it.

Hi @bschmiedeler , 

I am not clear about your requirement, if possible could you please inform me more detailed information(such as your expected output and your sample data (by OneDrive for Business))? Then I will help you more correctly.

Please do mask sensitive data before uploading.

Thanks for your understanding and support.
Best Regards,
Zoe Zhi

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

 

I am not comfortable putting any data in OneDrive. Let me try to describe the problem in a more simplified manner.

 

My company has 3 ice cream shops. We have an SQL table that will keep track of how many cups and cones are sold this season.

 

Name         Cups  Cones

MidtownXY
UpperEastZW
SuburbanUQ

 

I have agreed with each manager what their goals should be for this season, in the table below. This data is going to be just entered into a table in PowerBI or in an SQL table.

 

Name          Cups  Cones

Midtown400600
UpperEast800780
Suburban9001100

 

I want to construct a PowerBI sheet where I can choose one of the three names and then construct a chart showing for each metric (Cups and Cones in this example) the goal and how close to the goal the shop is. As we go through the season I can keep track of how the shops are doing. I would like to use something like a gauge chart to do this.

 

Any help would be greatly appreciated.

Helpful resources

Announcements
November Carousel

Fabric Community Update - November 2024

Find out what's new and trending in the Fabric Community.

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.

Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

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