cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
BiBra Member
Member

SUM in measure of unpivoted columns

Hello

I have an unpivoted column I want to be summed. I have tried the following:

 

Amount at recent date = 
CALCULATE(
    SUM('Amount'[Value]);
    FILTER('Amount';'Amount'[ActualStart] = MAX('Amount'[ActualStart])))

However, this does not seem to work. Anyone have any idea why it does not? 

I used the same piece of code in another unpivoted column, where the represented values are 1 and 0. However the problem occurs when the values exceeds this.

1 ACCEPTED SOLUTION

Accepted Solutions
BiBra Member
Member

Re: SUM in measure of unpivoted columns

I found the problem, quite simple in fact :
Select column -> modeling -> Data type. Then you can choose it yourself.

3 REPLIES 3
Highlighted
BiBra Member
Member

Re: SUM in measure of unpivoted columns

FYI I get the error message, saying it saves as string

 

v-huizhn-msft Super Contributor
Super Contributor

Re: SUM in measure of unpivoted columns

Hi @BiBra,

You created a calculated column, right? The syntax of your DAX formula is right. In your sample table, what's the data type of 'Amount'[ActualStart]? Could you please share your sample table for further analysis?

Best Regards,
Angelia

BiBra Member
Member

Re: SUM in measure of unpivoted columns

I found the problem, quite simple in fact :
Select column -> modeling -> Data type. Then you can choose it yourself.