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
Anonymous
Not applicable

Count Column not filtering properly

Hi all,

 

I'm currently having issues with a column used to count the total values of an attribute (in this example Engine CC). 

https://www.dropbox.com/s/b8antobqv56usf8/PBI%20Column%20Fix.pbix?dl=0 (PBIX file attached)image.png

If this works correctly, it will show how many of the Stand Value 1 and Stand Value 2 entries that coincide with "Engine CC" attribute are expected, yet for some reason it appears to also count the values from the circled attributes above e.g. it will couunt any value of "2001" it can find, so not just for Engine CC, but also Years Built and so on. If anyone could help with this it'd be seriously appreciated.   

image.png

Above is the "Data Source Info" table, which makes up the "Source Count" column. Below is the "Expected values - Data Source Info (2)" table, which makes the RDT expected count. image.png

Source Count Column=

CALCULATE(SUM('Data Source Info'[Data Source Count]),
FILTER('Data Source Info',
'Data Source Info'[Standardised Attribute Name]='Standardised Attribute Name Lookup w Value'[Standardised Attribute Name] &&
'Data Source Info'[Stand Value 1]='Standardised Attribute Name Lookup w Value'[Stand Value 1]&&
'Data Source Info'[Stand Value 2]='Standardised Attribute Name Lookup w Value'[Stand Value 2]))

 

RDT Expected Column=
CALCULATE(SUM('Expected Values - Data Source Info (2)'[Data Source Count]),
FILTER('Expected Values - Data Source Info (2)',
'Expected Values - Data Source Info (2)'[Standardised Attribute Name]='Standardised Attribute Name Lookup w Value'[Standardised Attribute Name] &&
'Expected Values - Data Source Info (2)'[Stand Value 1]='Standardised Attribute Name Lookup w Value'[Stand Value 1]&&
'Expected Values - Data Source Info (2)'[Stand Value 2]='Standardised Attribute Name Lookup w Value'[Stand Value 2]))

 

Kind regards,

 

Jordan 

3 REPLIES 3
parry2k
Super User
Super User

@Anonymous too long post to understand what is going on. It will be much easier if you paste sample data and expected output. Read this post to get your answer quickly.

https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Anonymous
Not applicable

Hi @parry2k,

 

PBIX file is attached to jump in if that makes it clearer. https://www.dropbox.com/s/b8antobqv56usf8/PBI%20Column%20Fix.pbix?dl=0 

 

Kind regards,

 

Jordan 

Hi @Anonymous ,

 

Can you please share the sample again? The link is not working.

 

Best Regards,
Xue Ding
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.