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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
EB09
Frequent Visitor

DAX formula working - not when filtered

Hi all,

 

I have created a relationship between demographic data and leave data as shown below as there were duplicates I couldn't remove in one of my tables.

 

EB09_0-1693411670814.png

 

I'm trying to show a calculation of amounts of leave taken compared to headcount data. (%)

 

I'm currently using the following formula:

 

Sick Days to Active Employees Ratio =
DIVIDE(
   'Sick Leave'[Sick Leave Spells Count],
   'Demo link'[Active Employees]
)
 
'Sick Leave Spells Count' is a measure in 'Sick Leave' table Sick Leave Spells Count = COUNTROWS('Sick Leave')
 
'Active Employees' is a measure in 'Demo link' table Active Employees =
COUNTROWS(
   FILTER(
      'Demo link',
      'Demo link'[Employee Status (Label)] = "Active"
   )
)
 
The formula I am using to calculate between the two works fine when entered. But when I apply the filter 'Company' on my report which appeares in both tables I am using, the % just shows 0%. Is there anything I can do to help with this? Is there something wrong with the relationship?
 
Thanks for any help!
1 ACCEPTED SOLUTION
parry2k
Super User
Super User

@EB09 yes



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

View solution in original post

5 REPLIES 5
parry2k
Super User
Super User

@EB09 yes



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

EB09
Frequent Visitor

Ignore me. I've had to change my filter to the 'Company' list from my new 'Companies' table, rather than having my field as' 'Company' from my 'Sick Leave' table. All good 🙂 Grateful for your help!

EB09
Frequent Visitor

Unfortunately when I filter by a specific company the measure that I have used still results in saying 0%. Is it to do with my formula?

parry2k
Super User
Super User

@EB09 do you have a company dimension that has a relationship with both the tables? 



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

EB09
Frequent Visitor

Do you mean by doing this?

 

EB09_0-1693421905052.png

 

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.

Top Solution Authors