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.
Hello Community,
I have a Power BI report where measures are calculated for each week of the year (up to W52). Using these weekly measures, I developed another measure called DOH (Days on Hand).
Now, I need to categorize the DOH values into ranges such as 0–14 Days, 14–28 Days, etc., and place these ranges into a slicer so that users can filter visuals accordingly. Since measures cannot be directly placed in a slicer, I created a parameter for DOH Range.
Here’s the challenge I’m facing:
The slicer works in the sense that when I select, say, 0–14 Days, the values in the visual update.
However, the visual still shows all rows (e.g., 10 rows) instead of filtering down to only those that fall within the selected range.
In short, the measure-driven slicer updates values but does not filter out rows from the table visual.
Also, I tried keeping the measure in visual filter, but that didn't help. Its giving an error as "Query has exceeded".
I even tried applying conditional formatting to highlight rows that meet the criteria, but ideally, I want the visual itself to filter down and show only the relevant rows.
Question:
Is there a way to achieve this behavior so that the slicer not only updates the measure values but also filters out the irrelevant rows in the visual?
Thanks in advance for your guidance!
Hi @Ankita_Das ,
A measure is computed at query time ; it doesnt take into account row context. Therefore you are getting all rows even though you filter for a specific value. I would suggest you go for a calculated column. By using a calculated column in slicer, the filtered value will respect the row-context since a calculated column is computed at row level.
Based on your description, I tried replicating the scenario to get the result-
Attached file for reference.
If I misunderstood anything, kindly provide more information about your data/data model as this could also be one of the reasons why the data is not getting filtered.
Thank You.
Let me know if that worked for you.