Bring your best ideas to the AI Use Case Contest! Enter to win 40 hours of expert engineering support and bring your vision to life using the powerful combination of Alteryx + AI. Learn more now, or go straight to the submission form.
Start Free Trial

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

How to do a group by using the output as column header

herbert1682
6 - Meteoroid

SELECT * FROM
(SELECT DISTINCT Invoice, Medical_Center, Year, Month FROM Denials_Scrub_Final) AS BaseData
Pivot (
COUNT(Invoice)
FOR Medical_Center
IN([BCHO], [UCSF],[UCD],[UCLA],[UCI],[UCSD])
)
AS PivotTable

 

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

I need to do this in Alteryx

2 REPLIES 2
cmcclellan
14 - Magnetar

I think this is what you're trying to do:

 

- a Summarize tool, with Invoice, Medical_Center, Year and Month as Group and Invoice as Count 

- then a Cross Tab tool, grouping by all the columns above except;

  • New Column Headers = Medical_Center
  • Values for New Columns = Invoice Count

 

herbert1682
6 - Meteoroid

This worked

Labels
Top Solution Authors