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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
sfagan55
New Member

Calculating a KPI based on value displayed in two visuals

Hey all!  Relatively new to PowerBI and I've run across a problem I haven't been able to find a solution to.  I have a report that displays a quantity of inspected items versus a quantity of defective items.  Unfortunately, the data for the total inspected items is in one source, and the data for the defectives is in another source.  When the two are linked together, filtering the data for the defective items will ONLY display data from the inspected items that were discovered to have a defect.  I have two separate visuals on my report which are filtered independently and show the correct values.  My question is this: is there a formula I can use to show a value based on addition/subtraction/multiplication/division of the displayed value in two separate visuals?

3 REPLIES 3
v-diye-msft
Community Support
Community Support

Hi @sfagan55 

 

Do you mean you'd like to apply the addition/subtraction/multiplication/division on several visuals separately? 

You might check with the what-if parameter:

https://docs.microsoft.com/en-us/power-bi/desktop-what-if 

 

 

Community Support Team _ Dina Ye
If this post helps, then please consider Accept it as the solution to help the other members find it more
quickly.

I should have started by saying that the visuals are both tables.  Column A in each identifies the type of defect, while Column B in Visual 1 displays the total number of inspections for that type of defect, while Column B in Visual 2 displays the total occurences of defect.  There aren't any filters in Visual 1 because I need the total quantity of inspections performed.  There are multiple filters on Visual 2 because it displays first pass yield.  If I apply the same filters to both visuals, then my total quantity inspected reduces to only the inspections where defects were discovered (because with the filters and links between tables defined, that's all it can recognize).  The number I need is the value in Column B of Visual 2 divided by the value in Column B of Visual 1 (defectives as a percent of total inspections).  I don't need the math to span multiple visuals, just to give me an aggregate value of the two visuals.

 

Thank you both for your assistance and I apologize I can't share the visual; it has proprietary data in it at the moment.  If I can strip it out, I'll share something.

kentyler
Solution Sage
Solution Sage

Depending on your visuals, you may be able to refer directly to the values being displayed by your visual in a DAX measure and load them into variables, then compare the variables to get your result.

 

Or you may be to recreate the filters on the visuals in your DAX measure to get the 2 values you want to compare.

 

If you can share a sample power bi file we can be more specific.





Did this post answer your question? Mark it as a solution so others can find it!

Help when you know. Ask when you don't!




Join the conversation at We Talk BI find out more about me at Slow BI


Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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