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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
ukantkumar123
Frequent Visitor

How to make custom column using sub-category count

I need to make custom coumn using "Category From A" count ?? ( Last column is expected coumn )

 

 

Please have a look on table !!

Category From ASub-Category From Table ASub-Category Used  From Table BUser Name from Table BExpected Count using Category From A 
Soil InvestigationTesingTesingRock1
FoundationOpen Foundation   
FoundationPile Foundation   
SubstructurePier   
SubstructurePier CapPier CapRock2
SubstructurePier CapPier CapTerry2
SuperstructureGirderGirderTerry1
SuperstructureGirderGirderSamson1
SuperstructureBearingBearingTerry1
SuperstructureBearingBearingSanju1

 

 

 

 

Capture.PNG

 

 

 

4 REPLIES 4
amitchandak
Super User
Super User

@ukantkumar123 , create a new measure like

 

countx(filter(allselected(tableA), TableA[Sub-Category] = max(TableA[Sub-Category] ) ), TableA[Sub-Category] )

 

 

or new column in Table A

countx(filter(tableA, TableA[Sub-Category] = earlier(TableA[Sub-Category] ) ), TableA[Sub-Category] )

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

Not Matching with "Expected Count using Category From A  cloumn"

 

ukantkumar123_0-1659366838166.png

 

@amitchandak @ta

 

Basically i have 2 table "TableA" and "TableB"

"TableA" data is fixed only TableB data filled by user.

Now I have Joined the table using "Sub-Category" Since it is a commnon on both the table

Now i need to count the based on "category" , "Sub-Category" and "User Name"

Cause For same category , for Sub-Category "user" can feed the data .



A kind of Group by Count ??

ukantkumar123_0-1659368170758.png

 

ukantkumar123_1-1659368244559.png

 

ukantkumar123_2-1659368365839.png

 

 

Anonymous
Not applicable

Hi @ukantkumar123 ,

I'm still a little confused. 

vpollymsft_0-1659579619139.png

 

Why do you get different values in the same case? Why the column Sub-Category From Table A also should be counted even if it is blank? 

 

Please provide more details with the desired output.

 

Best Regards
Community Support Team _ Polly

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.

Top Solution Authors