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

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.

Reply
Kyle_Willey
Frequent Visitor

Summarize 3 Columns into 1

Hi guys. I have something that I thought should have been easy, but I am not able to find a way to do this. I have a table with results in 3 different columns. I am trying to get a bar chart that will give me a count of each result if it is found in any of the 3 columns. I can get it if I stack the bars, but I want a single count, not one on top of the other. I tried to Summarize, but I still get 3 columns. Is there a way to do the below, but stack all three columns into one result column?

 

Current DAX:

CLABSIPathogens =
SUMMARIZE(
    'CLABSI Line List',
    'CLABSI Line List'[eventDate],
    'CLABSI Line List'[Pathogen1Name],'CLABSI Line List'[Pathogen2Name],'CLABSI Line List'[Pathogen3Name]
)
 
This gives me 4 columns as you can see. I want only eventDate and a single result column.
 
Thanks in advance.
1 ACCEPTED SOLUTION
Fowmy
Super User
Super User

@Kyle_Willey 

I am not sure if I understood your question but if you you need to pull out two columns from the SUMMARIZE table, do the following, you can repeat and apply for other combinations if you need.

CLABSIPathogens =
SELECTCOLUMNS (
    SUMMARIZE (
        'CLABSI Line List',
        'CLABSI Line List'[eventDate],
        'CLABSI Line List'[Pathogen1Name],
        'CLABSI Line List'[Pathogen2Name],
        'CLABSI Line List'[Pathogen3Name]
    ),
    'CLABSI Line List',
    'CLABSI Line List'[Pathogen1Name]
)
Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

View solution in original post

2 REPLIES 2
Fowmy
Super User
Super User

@Kyle_Willey 

I am not sure if I understood your question but if you you need to pull out two columns from the SUMMARIZE table, do the following, you can repeat and apply for other combinations if you need.

CLABSIPathogens =
SELECTCOLUMNS (
    SUMMARIZE (
        'CLABSI Line List',
        'CLABSI Line List'[eventDate],
        'CLABSI Line List'[Pathogen1Name],
        'CLABSI Line List'[Pathogen2Name],
        'CLABSI Line List'[Pathogen3Name]
    ),
    'CLABSI Line List',
    'CLABSI Line List'[Pathogen1Name]
)
Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

Thank you. This gave me what I needed:

 

CLABSIPathogens =
SELECTCOLUMNS(
    SUMMARIZE(
        'CLABSI Line List',
        'CLABSI Line List'[eventDate],
        'CLABSI Line List'[Pathogen1Name],
        'CLABSI Line List'[Pathogen2Name],
        'CLABSI Line List'[Pathogen3Name]
    ),
    "Pathogen",'CLABSI Line List'[Pathogen1Name],
    "Event Date",'CLABSI Line List'[eventDate]
)

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 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.

Top Solution Authors
Top Kudoed Authors