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 September 15. Request your voucher.

Reply
sup_dome
New Member

Count Specific Text in a Whole Table

Hi guys!

 

I am looking to count the text Unavailable only in the whole table and present it in chart form (bar or pie/donut) with the count only on the "Unavailable" Text. My data is as below:

 

sup_dome_0-1711001112745.png

appreciate suggestions for DAX and methods!

 

Thank you in advance!

 

1 ACCEPTED SOLUTION
Joe_Barry
Super User
Super User

Hi @sup_dome 

 

When you imported the data was it in that format? I would recommend changing the format from Pivot to Tabular

 

  • Go to Power Query
  • Highlight all columns except Date
  • Right click and Unpivot selected columns
  • You should be left with 3 columns Date, a Column with the column Names and a column with the Values
  • Load the data into the Report view
  • Create a measure 

 

 

Unavailable Count = 
CALCULATE(COUNTROWS(Table), 
    KEEPFILTERS(Table[Values] = 
          "Unavailable")​

 

 

Thanks

Joe

 

If you found my answer helpful and it solved your issue, please accept as solution




Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





Learn about the Star Schema, it will solve many issues in Power BI!

Date tables help! Learn more



LinkedIn
Let's connect on LinkedIn


View solution in original post

2 REPLIES 2
Joe_Barry
Super User
Super User

Hi @sup_dome 

 

When you imported the data was it in that format? I would recommend changing the format from Pivot to Tabular

 

  • Go to Power Query
  • Highlight all columns except Date
  • Right click and Unpivot selected columns
  • You should be left with 3 columns Date, a Column with the column Names and a column with the Values
  • Load the data into the Report view
  • Create a measure 

 

 

Unavailable Count = 
CALCULATE(COUNTROWS(Table), 
    KEEPFILTERS(Table[Values] = 
          "Unavailable")​

 

 

Thanks

Joe

 

If you found my answer helpful and it solved your issue, please accept as solution




Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





Learn about the Star Schema, it will solve many issues in Power BI!

Date tables help! Learn more



LinkedIn
Let's connect on LinkedIn


Thanks Joe! Appreciate it.

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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