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! Request now

Reply
shrungahv
New Member

Formula to create a new column to get the count of a row with same value/data for a particular month

Hi, Need your help. I am trying to achieve to create a new cloumn in Power BI with formula to get the count of same asset received for a particular month (expected result Column highlighted in Yellow) 

Below is the formula am applying but not returning the correct count. Please can someone help.

 

Asset count = var ast = [Asset] var mnt = [Month] return countrows(filter(filter(Query1, [Asset] = ast), [Month] = mnt))

Query1 is the table name
 

sample.JPG

2 REPLIES 2
ITGeek555
Helper II
Helper II

You could just create a measure

Asset Count = COUNTROWS(TableName)

and then put Asset, Month and Asset Count fields in a table visual

@ITGeek555Thanks for the response. I used the below Measure and it is giving the correct count but subtotal is not displaying correct.

AssetCountGreaterthan = IF(Query1[AssetCount] >= 3, Query1[AssetCount], BLANK())

i have 4 categories under the Matrix Row (Client Name, Asset Name, country, service line) when drill down to Asset Name it is showing 2 asset (asset1 and asset2 with 5 and 4 count respectively however under Client Name subtotal display 28 which should actually show to Subtotal as 9.
 
 
 
 
 

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.