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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
ginalu
Helper I
Helper I

Power BI Measure Not Responding to User Table Filters for Lesson Rate Calculation

Hello everyone,

I'm encountering an issue in Power BI where a measure that I created to calculate a lesson rate metric isn’t responding to filters applied on the USERUNQ table. To centralize metrics, I created this measure in a separate table called Statistics which serves as a placeholder for overall KPIs. However, filters applied to USERUNQ (e.g., region, date, or other dimensions) don’t seem to affect this LessonRate measure.

 

Here's the measure I’m using in the Statistics table:

 
LessonRate = DIVIDE( COUNTROWS(FILTER(USERUNQ, USERUNQ[lessonCount] > 0)), COUNTROWS(USERUNQ), 0 )

In my data model:

  • USERUNQ (my User table) contains individual user data, with a column lessonCount indicating the number of lessons attended by each user.
  • My objective is for LessonRate in the Statistics table to dynamically update based on filters in USERUNQ.

Here’s what I’ve tried so far:

  1. Adding CALCULATE to the measure:

     
    LessonRate = CALCULATE( DIVIDE( COUNTROWS(FILTER(USERUNQ, USERUNQ[lessonCount] > 0)), COUNTROWS(USERUNQ), 0 ) )
  2. Using ALLSELECTED to capture applied filters:

     
    LessonRate = CALCULATE( DIVIDE( COUNTROWS(FILTER(ALLSELECTED(USERUNQ), USERUNQ[lessonCount] > 0)), COUNTROWS(ALLSELECTED(USERUNQ)), 0 ) )
  3. Adding a calculated column in USERUNQ to flag users with lessonCount > 0:

     
    UserLessonRate = IF(USERUNQ[lessonCount] > 0, 1, 0)

    I then created a measure in Statistics to calculate the average, but it still doesn’t respond to filters.

  4. Checking relationships: Ensured that USERUNQ and related tables have active relationships and tried USERELATIONSHIP in the measure to manage filter flow, but with no success.

I would greatly appreciate any insights on how to achieve dynamic filter responsiveness for this measure in the Statistics table, or if there’s a better approach for calculating this type of overall metric.

Thank you in advance for any help!

1 ACCEPTED SOLUTION
danextian
Super User
Super User

Hi @ginalu ,

 

Did you use LessonRate  in a calculated table or column? Please note that measures used in a calculated tables or column do not respond to slicer selections - values will not change until the underlying data has changed/refreshed or formula is modified. If this isn't the case, can you please share a sanitized copy of your model (confidential data removed)? You can post a link to a cloud storage.










Did I answer your question? Mark my post as a solution!


Proud to be a Super User!









"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.

View solution in original post

2 REPLIES 2
ginalu
Helper I
Helper I

I got it! Thank you for your help.

danextian
Super User
Super User

Hi @ginalu ,

 

Did you use LessonRate  in a calculated table or column? Please note that measures used in a calculated tables or column do not respond to slicer selections - values will not change until the underlying data has changed/refreshed or formula is modified. If this isn't the case, can you please share a sanitized copy of your model (confidential data removed)? You can post a link to a cloud storage.










Did I answer your question? Mark my post as a solution!


Proud to be a Super User!









"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.