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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.

Reply
JRF_PowerBI
Frequent Visitor

Calculating measures based on another measure

Hi

 

New to Power BI and this forum, so apologies if there is an obvious solution to this, but couldn't find it anywhere on existing forum threads.

 

I have calculated two measures from 2 separate data tables - 'Hours Delivered' and 'Minimum Staff Hours'. Both use dates (I have a separate date table) and Locations as dimensions that appear in both source tables. I've then created a third measure - Safe Staffing Level? - which is a simple if statement returning "Yes" if HoursDelivered is greater than or equal to MinimumStaffHours; and "No" if its less. This means I can create a table in the visualisation pane showing staffing levels at each of our Locations, which looks like this:

Table_image.PNG

So far so good. I now want to create some rolled up measures that give me a count and percentage of days in any given month that each Location had a safe staffing level (i.e. based on a count of dates where Safe Staffing Levels? = "Yes"). Is this possible? Am I on the right lines with what I've done so far, or am I approaching this all wrong?!

3 REPLIES 3
Anonymous
Not applicable

Hi @JRF_PowerBI ,

 

Sounds like possible but will need confirmation. We can't help with this without sample data. So if you need us to help deal with Dax, please share some sample data and expceted result.

 

Best Regards,

Jay

Ashish_Mathur
Super User
Super User

Hi,

Share the link from where i can download your PBI file.  Also, show the exact result that you are expecting for a few sample months/locations.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
lbendlin
Super User
Super User

You're generally on the right track. Just keep in mind that measures usually involve context transitions, and using one measure inside another may be risky at times when these transitions conflict.  Better to create new measures for each particular question your want answered.

 

Generally you want to design measures in a way that they work for the subtotals and grand total. Then most of the time they will work fine for the individual display items, and for other filters. The reverse is seldom true.

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Kudoed Authors