Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
I have the following table
| 1 | User name | User group | Output Column |
| 2 | User 1 | ||
| 3 | User 1 | Group A | Group A |
| 4 | User 1 | Group B | Group B |
| 5 | User 2 | User 2 | |
| 6 | User 3 | Group A | Group A |
Basically I want my output column to show groups or users only if they do no belong to any group. For example above.
User 1 has a null row in the 2nd line but User 1 also belongs to Group A & Group B. So in my output I do not want to have User 1 as value in the 2nd row . Similarly, User 2 does not belong to any group so I want to show User 2 as value in my output column.
Solved! Go to Solution.
Hi @newpi ,
Create a Calculated Column
Op Column =
var a = CALCULATE(Count('Table'[User name]), FILTER('Table', 'Table'[User name] = EARLIER('Table'[User name])))
RETURN
IF(a = 1 && 'Table'[User group] = BLANK(), 'Table'[User name], 'Table'[User group])
Regards,
Harsh Nathani
Did I answer your question? Mark my post as a solution! Appreciate with a Kudos!! (Click the Thumbs Up Button)
@newpi , Try a new column like
Output Column =
var _1 = countx(filter(table,[User name] =earlier([User name]),[User group]))+0
return
switch( true() ,
isblank([User group]) && blank(_1)=0, [User name],
isblank([User group]) && blank(_1)>=0, blank(),
[User group]
)
Hi @newpi ,
Create a Calculated Column
Op Column =
var a = CALCULATE(Count('Table'[User name]), FILTER('Table', 'Table'[User name] = EARLIER('Table'[User name])))
RETURN
IF(a = 1 && 'Table'[User group] = BLANK(), 'Table'[User name], 'Table'[User group])
Regards,
Harsh Nathani
Did I answer your question? Mark my post as a solution! Appreciate with a Kudos!! (Click the Thumbs Up Button)
Thanks @harshnathani this works. Only. 1 question though, I'm still trying to understand the formula but because of earlier function or anything else in the measure, is it necessary that all user 1 rows should be in sequence (row 2,3,4 here)? The same user can also be out of sequence right? meaning on rows (2,3 & 5).
Also is there a way to not show up blank in the filter slicer?
HI @newpi ,
Yes, it can be out of sequence.
To understand the EARLIER formula, please see this video.
https://www.youtube.com/watch?v=lyhS2txtZ44&vl=en
Regards,
Harsh Nathani
Did I answer your question? Mark my post as a solution! Appreciate with a Kudos!! (Click the Thumbs Up Button)
Thanks @harshnathani The formula is also creating blanks (which we want it to) and grouping all user 1 under that blank and showing blank as a value in the slicer. Anyway to get rid of that?
Hi @newpi ,
Use the Visual Filter
Regards,
Harsh Nathani
Did I answer your question? Mark my post as a solution! Appreciate with a Kudos!! (Click the Thumbs Up Button)
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
| User | Count |
|---|---|
| 58 | |
| 45 | |
| 40 | |
| 21 | |
| 18 |