Microsoft Fabric Community Conference 2025, March 31 - April 2, Las Vegas, Nevada. Use code FABINSIDER for a $400 discount.
Register nowThe Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.
Hi,
I have a data table which has details of order number, date, tickets, category of tickets and their prices and i need help to create a custom table/summarized table which categorises the ticket counts under each type(as fields from current row details).
Can someone please help.
Data table sample is as below screenshot
Required Table should be as below
Thanks in advance!
Solved! Go to Solution.
You can try below in Power BI, go to the "Modeling" tab and click on "New Table." Use the following DAX code as an example:
NewSummaryTable =
SUMMARIZE(
DataTable,
DataTable[Customer Number],
"Total Tickets", SUM(DataTable[Total Tickets]),
"Paid Tickets", SUM(DataTable[Paid Tickets]),
"Complimentary Tickets", SUM(DataTable[Complimentary Tickets]),
"Adult", SUMX(FILTER(DataTable, DataTable[Ticket Type] = "Adult"), DataTable[Tickets]),
"Kids", SUMX(FILTER(DataTable, DataTable[Ticket Type] = "Kids"), DataTable[Tickets]),
"Fan Club", SUMX(FILTER(DataTable, DataTable[Ticket Type] = "Fan Club"), DataTable[Tickets]),
"Visiting Team", SUMX(FILTER(DataTable, DataTable[Ticket Type] = "Visiting Team"), DataTable[Tickets]),
"Players and Club Guests", SUMX(FILTER(DataTable, DataTable[Ticket Type] = "Players and Club Guests"), DataTable[Tickets])
)
This will generate a summarized table with the breakdown of ticket counts per type for each customer.
You can try below in Power BI, go to the "Modeling" tab and click on "New Table." Use the following DAX code as an example:
NewSummaryTable =
SUMMARIZE(
DataTable,
DataTable[Customer Number],
"Total Tickets", SUM(DataTable[Total Tickets]),
"Paid Tickets", SUM(DataTable[Paid Tickets]),
"Complimentary Tickets", SUM(DataTable[Complimentary Tickets]),
"Adult", SUMX(FILTER(DataTable, DataTable[Ticket Type] = "Adult"), DataTable[Tickets]),
"Kids", SUMX(FILTER(DataTable, DataTable[Ticket Type] = "Kids"), DataTable[Tickets]),
"Fan Club", SUMX(FILTER(DataTable, DataTable[Ticket Type] = "Fan Club"), DataTable[Tickets]),
"Visiting Team", SUMX(FILTER(DataTable, DataTable[Ticket Type] = "Visiting Team"), DataTable[Tickets]),
"Players and Club Guests", SUMX(FILTER(DataTable, DataTable[Ticket Type] = "Players and Club Guests"), DataTable[Tickets])
)
This will generate a summarized table with the breakdown of ticket counts per type for each customer.
Thank you, I'll try this 🙂
Sure ... contacht with me if you have any issue regarding this .
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the February 2025 Power BI update to learn about new features.
User | Count |
---|---|
85 | |
78 | |
53 | |
38 | |
36 |
User | Count |
---|---|
100 | |
85 | |
47 | |
45 | |
44 |