Forum Discussion
GlynMThomas
5 years agoResolver I
Sum By Column
Hi, I have a table like below: Name Group Month Amount Bob Tennis Jan 100 Bob Football Jan 50 Fred Tennis Jan 50 Mary Football Feb 40 Mary Golf Jan 300 ...
- 5 years ago
You can use the measure to filter a visual. Im not sure I understand what you need. If it's a calculated column in the table above, then:
Flag = VAR amountCustomerMonth_ = CALCULATE ( SUM ( Table1[Amount] ), ALLEXCEPT ( Table1, Table1[Name], Table1[Month] ) ) RETURN IF ( amountCustomerMonth_ > 100, "Paying over 100 quid", "NOT paying over 100 quid" )Please mark the question solved when done and consider giving a thumbs up if posts are helpful.
Contact me privately for support with any larger-scale BI needs, tutoring, etc.
Cheers
amitchandak
5 years agoSuper User
GlynMThomas , create these two new columns and use the flag as a filter
New column =
var _1 = sumx(filter(Table, [Name] =earlier[Name] && [Month] =earlier[Month]),[Amount])
return if(_1>100, 1, 0)
Flag =
var _1 = countx(filter(Table, [Name] =earlier[Name]),[New column])
var _2 = sumx(filter(Table, [Name] =earlier[Name]),[New column])
return
if(_1 =_2, 1,0)