Starting December 3, join live sessions with database experts and the Microsoft product team to learn just how easy it is to get started
Learn moreGet certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now
Hello,
I have the following data
I am trying to create a new table that groups the "Department" column and sums "No of device"
filtered on "Ticket Status" (Open) and "Attribute" containing the keyword "Laptop".
ID | Year | Department | Ticket Status | Attributes | No of device |
1 | 2022 | Finance | Open | Laptop keyboard issue | 2 |
2 | 2022 | Finance | Open | Docking Station | 2 |
3 | 2022 | HR | Closed | Laptop Disk Issue | 1 |
4 | 2022 | IT | Open | Docking Station | 2 |
5 | 2022 | IT | Open | Laptop Webcam Issue | 9 |
Solved! Go to Solution.
Hi @harpreetsingh08 ,
Here a solution in DAX:
Note, I called the table you pasted above 'TableToBeGrouped'
TableGroupedNew = SUMMARIZE ( FILTER ( 'TableToBeGrouped', [Ticket Status] = "Open" && CONTAINSSTRING ( TableToBeGrouped[Attributes], "Laptop" ) ), [Department], "SumOfTickets", SUM ( 'TableToBeGrouped'[No of device] ) )
Let me know if this helps or if you need the solution in Power Query 🙂
/Tom
https://www.tackytech.blog/
https://www.instagram.com/tackytechtom/
Did I answer your question❓➡️ Please, mark my post as a solution ✔️ |
Also happily accepting Kudos 🙂 |
Feel free to connect with me on LinkedIn! |
#proudtobeasuperuser |
Awesome that I could help! Do not forget to mark the answer as a solution 🙂
You cannot sum over strings. You need to change the column to number:
Hope this helps!
/Tom
https://www.tackytech.blog/
https://www.instagram.com/tackytechtom/
Did I answer your question❓➡️ Please, mark my post as a solution ✔️ |
Also happily accepting Kudos 🙂 |
Feel free to connect with me on LinkedIn! |
#proudtobeasuperuser |
Awesome that I could help! Do not forget to mark the answer as a solution 🙂
You cannot sum over strings. You need to change the column to number:
Hope this helps!
/Tom
https://www.tackytech.blog/
https://www.instagram.com/tackytechtom/
Did I answer your question❓➡️ Please, mark my post as a solution ✔️ |
Also happily accepting Kudos 🙂 |
Feel free to connect with me on LinkedIn! |
#proudtobeasuperuser |
Hi @harpreetsingh08 ,
Here a solution in DAX:
Note, I called the table you pasted above 'TableToBeGrouped'
TableGroupedNew = SUMMARIZE ( FILTER ( 'TableToBeGrouped', [Ticket Status] = "Open" && CONTAINSSTRING ( TableToBeGrouped[Attributes], "Laptop" ) ), [Department], "SumOfTickets", SUM ( 'TableToBeGrouped'[No of device] ) )
Let me know if this helps or if you need the solution in Power Query 🙂
/Tom
https://www.tackytech.blog/
https://www.instagram.com/tackytechtom/
Did I answer your question❓➡️ Please, mark my post as a solution ✔️ |
Also happily accepting Kudos 🙂 |
Feel free to connect with me on LinkedIn! |
#proudtobeasuperuser |
Thanks, it solved the problem!
There is one more fix I need help with, the "No of device" is a string.
How to sum a string data type?
Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.
User | Count |
---|---|
89 | |
87 | |
81 | |
64 | |
49 |
User | Count |
---|---|
123 | |
109 | |
88 | |
68 | |
67 |