Forum Discussion
vbvbvb
Microsoft Employee
3 years agoAdd filter to show specific values in calculated columns
Hi all, Trying to solve following task. I have data in more or less same format, where final goal is to calculate Aveage value based on Month and Year values: Name of colour Certain Valu...
- 3 years ago
Hi vbvbvb,
Modify the formula to:
AvgValue Blue = VAR _table = FILTER ( TableName, TableName[Year] = EARLIER ( TableName[Year] ) && TableName[Month] = EARLIER ( TableName[Month] ) && TableName[Certain Value] <> BLANK () && 'TableName'[Name of colour] IN { "Blue" } ) RETURN IF ( [Name of colour] IN { "Blue" }, SUMX ( _table, TableName[Certain Value] / COUNTROWS ( _table ) ) )I add an if condition in the code, tweak the color in different color columns.
I attach my sample below for your reference.
Best Regards,
Community Support Team _ kalyjIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
vbvbvb
Microsoft Employee
3 years agoThat works, thank you very much for all advice!