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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
LuITS
Helper II
Helper II

Show row count of Text Column in Total

Hello,

 

i have a table visual with collumns containing text values and collumns containing numeric values.

I can show the Total of numeric collumns in the Total row, can i also show the total row count of a text collumn.
Column should still display the text values but with row count at the end. 

Can this only be done with help of meassures or is there a built in functionallity?

 

 ProduktCost
 A5
 B5
 B15
 C10
Total435

 

7 REPLIES 7
Abhilash_P
Continued Contributor
Continued Contributor

Hi @LuITS ,
You can create a measure with DAX function Count.
Below is the image for your reference

Abhilash_P_0-1753695580796.png

 

 

MSpowerbiGuru
New Member

you can try:

SWITCH (
TRUE (),
ISINSCOPE ( 'Table'[Produkt] ), Countrows(Produkt),
ISINSCOPE ( 'Table'[Cost] ), Sum(Cost))

 

FBergamaschi
Solution Sage
Solution Sage

You can also avoid measures even though it is not suggested

 

You can use count for the test and sum for numbers, aitomatic aggregations by Power BI

 

But can I see the model table to be sure I understood the result you want?

Hi, @FBergamaschi  i have simple example with the financials test dataset.
So i selected in Summarization for collumn country: Count

LuITS_1-1753694411286.png

No aggregation for collumn country.

 

When i select Count in visualisation Pannel for country it counts. But i want the behavior to still see the text values in the table (Canada, France, etc.) and only a total of the count at the buttom.

LuITS_2-1753694529475.png

 

Here

 

FBergamaschi_0-1753695143874.png

for country there is no summarization and you have SUM for COGS

 

Here

 

FBergamaschi_1-1753695184161.png

 

you have now count for country, add again the country column on top of the Count of Cuontry and you get your result

 

If this helped, please consider giving kudos and mark as a solution

@me in replies or I'll lose your thread

Want to check your DAX skills? Answer my biweekly DAX challenges on the kubisco Linkedin page

Consider voting this Power BI idea

Francesco Bergamaschi

MBA, M.Eng, M.Econ, Professor of BI

count for the text value will give you count in the cells. If you want to see the text is cell and rowcount in the total, Using measure could be the approach.

you can try:

SWITCH (
TRUE (),
ISINSCOPE ( 'Table'[Produkt] ), Countrows(Produkt),
ISINSCOPE ( 'Table'[Cost] ), Sum(Cost))

 

MSpowerbiGuru
New Member

You will to write measures to find count rows for text values and sum od values for Numerical values. and then write a measure for total and use inscope function with if for produkt and cost.

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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

Top Solution Authors