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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
MarshalSK
Resolver I
Resolver I

How to calculate record count

Hi Folks, Need you assistance to count records in summarized table.

 

Sample Data:

 

CountryCityStateSales
United StatesHoustonTexas50
United StatesPhiladelphiaPennsylvania200
United StatesLos AngelesCalifornia340
United StatesHuntsvilleTexas100
United StatesHuntsvilleTexas200
United StatesLaredoTexas300
United StatesLaredoTexas400
United StatesLaredoTexas200

 

Expected Result:

MarshalSK_2-1708829745852.png

 

MarshalSK_0-1708828517374.png

 

1 ACCEPTED SOLUTION

Hi @MarshalSK 
In this scenario you can create a calculated column :

Ritaf1983_0-1708830470958.pngRitaf1983_1-1708830507225.png

The updated pbix is attached

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

View solution in original post

5 REPLIES 5
Ritaf1983
Super User
Super User

Hi @MarshalSK 
You can use the basic countrows Dax function

Ritaf1983_0-1708829246473.png

pbix is attached

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

Hi @Ritaf1983 , DAX should work for below scenario as well.

 

MarshalSK_0-1708829839287.png

 

Hi @MarshalSK 
In this scenario you can create a calculated column :

Ritaf1983_0-1708830470958.pngRitaf1983_1-1708830507225.png

The updated pbix is attached

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

@Ritaf1983 Perfect Thanks

Happy to help😊

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.