Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
vacacelaivan
Frequent Visitor

Need Help with SUMX based on a different column

Hi all,

 

Been stuck with this measure for a while.

I'm looking to create a measure that provides the SUM of a column based on the SUM of another column.

 

Measure1 = CALCULATE(
    SUMX('Table1','Table1'[Alerts Worked]),
    FILTER('Table1', SUM('Table1'[Time in Queue]) > 0 ))

 

This provides the following result:

 Apr-18May-18Jun-18Jul-18Aug-18Sep-18Oct-18
Product1  46566 54616546
Product2 656 5472478  
Product33698165 864 23564
Product44656    5444
Total       

 

 

The total row is blank and needs to be populated for the desired result. 

Any help is much appreciated!

1 ACCEPTED SOLUTION
v-shex-msft
Community Support
Community Support

Hi @vacacelaivan,

 

Unfortunately, dax formula not support summary across multiple columns, you need to manually summary each columns.

 

I'd like to suggest you do 'unpivot columns' in query edit then you can simply summary transformed values by dax formula.

Unpivot Data Using Excel Power Query

 

 

Measure =
CALCULATE (
    SUM ( Table[Alerts Worked] ),
    FILTER ( ALLSELECTED ( Table ), [Date] <= MAX ( Table[Date] ) ),
    VALUES ( Table[Product] )
)

 

 

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

View solution in original post

2 REPLIES 2
v-shex-msft
Community Support
Community Support

Hi @vacacelaivan,

 

Unfortunately, dax formula not support summary across multiple columns, you need to manually summary each columns.

 

I'd like to suggest you do 'unpivot columns' in query edit then you can simply summary transformed values by dax formula.

Unpivot Data Using Excel Power Query

 

 

Measure =
CALCULATE (
    SUM ( Table[Alerts Worked] ),
    FILTER ( ALLSELECTED ( Table ), [Date] <= MAX ( Table[Date] ) ),
    VALUES ( Table[Product] )
)

 

 

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.
AlB
Super User
Super User

Hi @vacacelaivan

 

Can you share the pbix?

It's a bit difficult to see what might be going on without it

Helpful resources

Announcements
PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.