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.
v-janeyg-msft
Community Support
5 years agoHi, 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.