Forum Discussion
Daniel_Fdrvc
Helper I
5 years agoCan't sum Total
Hi all, here's a main problem: i need to SUM peoples that ar in different categories. First I have created a measure that calculates me amount of sales (left table): GD sutartys = C...
- 5 years ago
Hi, Daniel_Fdrvc
According to your description, I modify your two measures and create a new measure to show the result you want.
Like this:
1 = VAR a = SUMMARIZE ( Sales, Sales[Date], Sales[GD], Sales[ID], "1", IF ( SUM ( Sales[GD] ) = 1, 1, 0 ) ) RETURN SUMX ( a, [1] )2 = VAR a = SUMMARIZE ( Sales, Sales[Date], Sales[GD], Sales[ID], "2", IF ( SUM ( Sales[GD] ) > 1, 1, 0 ) ) RETURN SUMX ( a, [2] )3 = IF([1]+[2]>2,[1]+[2]*2,0)If you still have problems, please feel free to ask me.
Best Regards
Janey Guo
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
parry2k
Super User
5 years agoDaniel_Fdrvc it is not clear where you want to see the total based on the calculation you provided:
Based on this SUM OF TOTAL in each month i need to calculate IF((1GD + 2GD) > 2,(1GD*1+2GD*2),0). For example in january there should be: 1+2 = 3 > 2, so 1*1+2*2 = 5
- Daniel_Fdrvc5 years ago
Helper I
In the same matrix table, like a third column:
1GD
2GD
Third: IF((1GD + 2GD) > 2,(1GD*1+2GD*2),0)