The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.
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:
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?!
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
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.
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.