Forum Discussion
aw3w2
6 months agoRegular Visitor
Apply data to all rows in a filtered column
Hello- fairly new to Power BI so I'm hoping this one is easy. I'm trying to classify each owner as Yes or NO based on whether or not they achieved a Tier 3 (the tiers go from 1-10, and achieving Tier...
- 6 months ago
You have a few different options.
You can join the output to a reference of your original table. Steps would be: 1) finalize your original table, disable load; 2) reference your original from #1 and perform the grouping I outlined above, disable load; 3) reference your original from #1, join the categories from #2, enable load
While this is relatively straightforward to do through the UI, it's not as performant as just doing the work inside the group. For that you'll have to implement with M in your formula bar or advanced editor. Here is the full advanced editor snip:
let Source = Sample, GroupOps = Table.Group(Source, {"Owner"}, {{ "GroupOps", each [ grouped_rows = _, group_category = if List.Max(grouped_rows[Tiers]) >= 3 then "Yes" else "No", grouped_rows_with_category = Table.AddColumn( grouped_rows, "Threshold Met", each group_category, type text ) ][grouped_rows_with_category], type table }}), Combine = Table.Combine( GroupOps[GroupOps] ) in CombineOutput:
cengizhanarslan
Super User
6 months agoPlease try the following formula:
Threshold Status =
VAR MaxTierForOwner =
CALCULATE (
MAX ( 'YourTable'[Tiers] ),
ALLEXCEPT ( 'YourTable', 'YourTable'[Owner] )
)
RETURN
IF ( MaxTierForOwner >= 3, "Yes", "No" )