Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

Calculate Sum Column help

Hi all,

 

I'm trying to use a centralised table to get a sum of attributes from different sources, but I'm having issues. (PBI file below).  

https://www.dropbox.com/s/b8antobqv56usf8/PBI%20Column%20Fix.pbix?dl=0 

 

My DAX doesn't seem to filter out the count of "2001" by "Engine Capacity", instead it finds any instance of "2001" in that table and sums that instead? (Code in spoiler)

 

Any help is appreciated!

 

Spoiler
Source Count =
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]))

Kind regards,

 

Jordan  

  • Anonymous's avatar
    Anonymous
    6 years ago

    Hi all,

     

    issue solved. The centralised table had duplicate values in it, e.g:

     

    engine CC, 2001 -> 2001

    engine CC, 2001 -> 2001

     

    so I was getting a double or triple of the count in some places, which was then being summed. I solved this by doing an excel export of the attribute name, stand value 1 and stand value 2, removing duplicates then loading it again!

3 Replies