Forum Discussion
Kyle_Willey
2 years agoFrequent 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 wil...
- 2 years ago
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] )
Fowmy
2 years agoSuper 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]
)- Kyle_Willey2 years agoFrequent Visitor
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])