Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago

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)

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.   

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. 

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