Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
Anonymous
Not applicable

Fixed count for every row with % ratio

Hi community!

 

I'm working on a problem which I try to ilustrate on below example.

 

kosekk_g_0-1659701012396.png

1 is my table. As you can see, I have some people with theri attributes and with business units their belong to (main BU and Sub-BU). What I have now in Power BI i the 2 view. That was quite easy to do. 

 

But right now, I need implement view 3 and create new column that shows percentage ratio. I need to calculate number of names in BUs and Sub-BUs that will not change regardless of chosen attribute. I've tried different measures but cannot get the right values. 

 

I will appreciate any guidance.

2 REPLIES 2
amitchandak
Super User
Super User

@Anonymous , based on what I got, These two measures can help

 

countx(filter(allselected(Table), [Business Unit] = max(Table[Business Unit]) ), [Name])

 

countx(filter(allselected(Table), [Business Unit] = max(Table[Business Unit]) && [Sub BU] = max(Table[Sub BU]) ), [Name])

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Anonymous
Not applicable

Hi @amitchandak. Thanks for replay. Unfortunately, this solutions solution doesn't resolve my problem. This example I provided is very simplified. In reality my data model is much bigger and columns are in seperate tables. (only BU and SUB-BU are in the same table, Names and Attribute are in seperate ones). Also, it gives me an error as last argument of COUNTX should be an expression and not the column name.

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.