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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
pe2950
Helper I
Helper I

Filtering Lookup Tables?

In need of a little help on a report:

 

  1. Data table has "appointments", each record has an appointment date, and a "resource GUID" that i particuarlly care about
  2. The "resource ID" has a relationship to a resource lookup table
  3. I've created a measure called 'CountRows" that will count the number of appointment rows
  4. The question the report will answer "How many upcoming appointments do we have, broken down by resource in the next X number of days"

 

Report Settings:

  • Axis = DateKey 
  • Value = CountRows(Measure) [Defined as = COUNTROWS(Appointments) + 0]
  • Legend = Resource_Description
    • Filter: CountRows = All; DateKey = is in the next 14 days

Issue Description:

  • The report generates the correct counts, but in the legend I get all 100+ entries in the resource lookup table. All but 2 entries in the resource lookup table have a count of 0.
  • Is there a problem with my relationship, or do i need to change the measure, or add a filter to "only display resources where the count is > 0?
    • As a "fix" i set the filter on "Resource" to display relative top N (2) values; value by CountRows. I feel this is a "hacky" fix, as if a new resource is established that has events, it will not be displayed in the report.

Suggestions?

  • I essentially need a filter on the resource "where countRows > 0; but i can only seem to get this by doing a Top N which requires a static value? 
1 ACCEPTED SOLUTION
v-chuncz-msft
Community Support
Community Support

@pe2950,

 

It seems that you may just set Show items when the value is not 0 for measure in Visual level filters.

Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

1 REPLY 1
v-chuncz-msft
Community Support
Community Support

@pe2950,

 

It seems that you may just set Show items when the value is not 0 for measure in Visual level filters.

Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.