cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper I
Helper I

ConcatenateX with text and counts

Hello all, 

 

I have a need to create a Concatenated list with Counts and Values.   I can get the unique values through ConcatenateX, but I want to add the count of the number of times they appear.

 

My column is like this

 

Status

Pending
Pending
Pending
Live
Live

 

Im trying to write a measure to get a card that says " 3 Pending, 2 Live".   i can get to "Pending, Live" with this

CONCATENATEX(DISTINCT('Table'[Status]),'Table'[Status],", ")
 
But if I try to add any kind of count of the rows, I get "5 Pending, 5 Live"
 
Any ideas?
 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Super User IV
Super User IV

Re: ConcatenateX with text and counts

Try this:

 

Measure = 
    VAR __Table = 
        SUMMARIZE(
            'Table',
            [Status],
            "Count",COUNTROWS('Table')
        )
RETURN
    CONCATENATEX(__Table,[Count] & " " & [Status],", ")

---------------------------------------

Putting square pegs in round holes since 1972.

I have a NEW book! 
DAX Cookbook from Packt
Over 120 DAX Recipes!




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

Proud to be a Super User!




View solution in original post

3 REPLIES 3
Highlighted
Super User IV
Super User IV

Re: ConcatenateX with text and counts

Try this:

 

Measure = 
    VAR __Table = 
        SUMMARIZE(
            'Table',
            [Status],
            "Count",COUNTROWS('Table')
        )
RETURN
    CONCATENATEX(__Table,[Count] & " " & [Status],", ")

---------------------------------------

Putting square pegs in round holes since 1972.

I have a NEW book! 
DAX Cookbook from Packt
Over 120 DAX Recipes!




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

Proud to be a Super User!




View solution in original post

Highlighted
Helper I
Helper I

Re: ConcatenateX with text and counts

Brilliant!  Thank you!

Highlighted
Super User IV
Super User IV

Re: ConcatenateX with text and counts

Apparently that worked then? 🙂

---------------------------------------

Putting square pegs in round holes since 1972.

I have a NEW book! 
DAX Cookbook from Packt
Over 120 DAX Recipes!




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

Proud to be a Super User!




Helpful resources

Announcements
Community Blog

Community Blog

Visit our Community Blog for articles, guides, and information created by fellow community members.

Using the Community

Using the Community

Need help with the Power BI Community? Our 'Using the Community' support articles are a great place to start.

Community Summit North America

Community Summit North America

Innovate, Collaborate, Grow. The top training and networking event across the globe for Microsoft Business Applications

Power Platform 2020 release wave 2 plan

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors