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

Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!

Reply
jett254
Regular Visitor

Need help with calculating in aggregate

I'm trying to create a Dashboard and I am a new Power BI user.

 

I've created two different bar graphs -- one shows the % of physicians who ordered a particular drug (the data has one record per MD, and has an "Ordered" field that is a string with Yes/No.  This data is reported on a weighted basis so I've done that by using my weight as the value on the graph.  I know this is working because it matches my SPSS results.

 

I have a second bar graph that shows the % of physicians who ordered a particular formulation of the drug (same table, a different variable that is a string Yes/No).  This data is not weighted so my value for the chart is just a flag of 1 for every MD.  This graph is filtered to only be those that ordered in graph #1.

 

So, both of my graphs are fine.  Now I need to create another graph or table that multiplies the % that ordered * the % that ordered the particular formulation together, on an aggregate basis.

 

So if in graph one, it was 60% ordered (40% did not) and graph 2 was (50% ordered that form/50% did not), I need to produce a graph that is 60% * 50% = 30%.  Any suggestions on how to do this??  This is done by year, so year is on the axis in each graph....

1 REPLY 1
Anonymous
Not applicable

Unclear if you wrote measures for the values in the first 2 graphs.  Probably best if you did.  And I'm not sure how your model looks, but you could image something like:

 

Total Physicians = COUNTROWS(Physicians)

Total Ordering Physicians = CALCULATE([Total Physicans], FILTER(Physicians, SUM(Orders[Quanity]) > 0))

% ThingOne = DIVIDE ([Total Physicians], [Total Ordering Physicians])

 

% ThingTwo = ... however you do that... 🙂

 

% ThingOneThingTwo = [% ThingOne] * [% ThingTwo]

 

 

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

Vote for your favorite vizzies from the Power BI World Championship submissions!

Sticker Challenge 2026 Carousel

Join our Community Sticker Challenge 2026

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

January Power BI Update Carousel

Power BI Monthly Update - January 2026

Check out the January 2026 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.