- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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:
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:
Adding CALCULATE to the measure:
LessonRate = CALCULATE( DIVIDE( COUNTROWS(FILTER(USERUNQ, USERUNQ[lessonCount] > 0)), COUNTROWS(USERUNQ), 0 ) )Using ALLSELECTED to capture applied filters:
LessonRate = CALCULATE( DIVIDE( COUNTROWS(FILTER(ALLSELECTED(USERUNQ), USERUNQ[lessonCount] > 0)), COUNTROWS(ALLSELECTED(USERUNQ)), 0 ) )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.
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!
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
Dane Belarmino | Microsoft MVP | Proud to be a Super User!
Did I answer your question? Mark my post as a solution!
"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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I got it! Thank you for your help.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
Dane Belarmino | Microsoft MVP | Proud to be a Super User!
Did I answer your question? Mark my post as a solution!
"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.
