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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

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
Solution Supplier
Solution Supplier

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

View solution in original post

2 REPLIES 2
Joe_Barry
Solution Supplier
Solution Supplier

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

Thanks Joe! Appreciate it.

Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

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