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
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
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.