Forum Discussion

Pok's avatar
Pok
Regular Visitor
4 years ago

Sum Two Cols

Hi Im trying to create a sum across two columns when col a is a measure and col b a derived column with a 1 or 0 value.

 

NewColumn =

      SUM(table1[a])        Measure col built from some pre filtering  + distinct has taken place.

    +

     SUM(table2[b])      Regaular column contains either 1 or 0 based on some criteria.

 

When you enter the dax formula the measure col a is invisible to the DAX formula. I have tried using sumx as a work around but no luck.

How do you create a sum across two fields from different tables when one is a measure and the other is just a derived column

 

I get the error This can happen when a measure formula refers to a column that contains many values without specifying an aggregation such as min max count or sum to get a single result.

 

 

2 Replies

  • jaipal's avatar
    jaipal
    Resolver III

    Pok You need to make sure both columns has the data type and try again

  • Hi Pok ,

    Why dont you try creating two measures ie: one that was previously built and the one created to sum the column and the measure ?

     

    Please accept this as a solution if your question has been answered !!

    Appreciate a Kudos ğŸ˜€