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
kcantor
Community Champion
Community Champion

Odd Filter Behavior

I am attempting to work with Distinct Count on my items table. We currenlty have 152,000+ items listed and when I use the measure Number of Items=DISTINCTCOUNT('Item'[Code]) I get the correct number initially. My item table has no associated dates and is tied to my sales table using the code column. When I use the sales table to calculate qty sold, qty sold last year, and qty growth (sorting by category) it works beautifully. When I add a column showing the count of items we carry, the date filter seems to interfere with the item count. It goes from 152,000+ to 19,000.

Why is my date sorting messing with that measure? It works perfectly in PowerPivot.





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

Proud to be a Super User!




1 ACCEPTED SOLUTION
austinsense
Impactful Individual
Impactful Individual

You probably have a bi-directional relationship set up in Power BI.

Austin is VP Operations at PowerPivotPro and a professional self-service enthusiast 🙂

View solution in original post

3 REPLIES 3
asocorro
Skilled Sharer
Skilled Sharer

Is the relationship between the tables bi-directional?  This might be causing the reverse filtering.  Try to set it to one way.

Connect with me in LinkedIn: https://pr.linkedin.com/in/adolfosocorro
Follow me on Twitter: https://twitter.com/AdolfoSocorro
austinsense
Impactful Individual
Impactful Individual

You probably have a bi-directional relationship set up in Power BI.

Austin is VP Operations at PowerPivotPro and a professional self-service enthusiast 🙂

And that is why I stopped fighting it and asked here.  Something relatively simple was overlooked.

Thanks for the help. Both were solutions but could only mark one so I marked the top one.

@austinsense Don't tell Avi that I missed that one. He covered it in training.





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

Proud to be a Super User!




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.