Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
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! Prices go up Feb. 11th.
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
144 | |
85 | |
65 | |
51 | |
45 |
User | Count |
---|---|
217 | |
88 | |
81 | |
65 | |
56 |