The ultimate Microsoft Fabric, Power BI, Azure AI, and SQL learning event: Join us in Stockholm, September 24-27, 2024.
Save €200 with code MSCUST on top of early bird pricing!
Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
Hi,
I'm new to Power BI and facing issue in dtermining the Apprvoal Flow of an order. Please find the below data.
Order ID | Approvers |
123 | Manager |
123 | Category Manager |
123 | Interal Team |
121 | Manager |
121 | Internal Team |
124 | Internal Team |
From the above table I need to find the no. of orders which got approved by
1. Only Managers
2. Only Category Managers
3. Only Internal Team
4. Manger+ Category Managers
5. Manager+ Internal Team
6. Category Managers+Internal Team
7. Manger+ Category Managers+Internal Team.
Hence, from the above table the result should come as
Approval Flow | Count |
Manager+Category Manager+Internal Team | 1 |
Manager+Internal Team | 1 |
Internal Team | 1 |
Any post regarding this would be appreciated.
Thank you
Solved! Go to Solution.
Hi @Thiru ,
I suggest you to create a calculated column in your table.
Approval Flow = CONCATENATEX(FILTER('Table','Table'[Order ID] = EARLIER('Table'[Order ID])),'Table'[Approvers]," + ")
Measure:
Count = CALCULATE(DISTINCTCOUNT('Table'[Order ID]))
Result is as below.
Best Regards,
Rico Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
I was able to restructe the data by adding 4 columns as shown below.
Order ID | Approvers | Count | Manager | Category Manager | Internal Team |
123 | Manager | 3 | Manager | ||
123 | Category Manager | 3 | Category Manager | ||
123 | Interal Team | 3 | Interal Team | ||
121 | Manager | 2 | Manager | ||
121 | Internal Team | 2 | Interal Team | ||
124 | Internal Team | 1 | Interal Team |
Count :
Hi @Thiru ,
I suggest you to create a calculated column in your table.
Approval Flow = CONCATENATEX(FILTER('Table','Table'[Order ID] = EARLIER('Table'[Order ID])),'Table'[Approvers]," + ")
Measure:
Count = CALCULATE(DISTINCTCOUNT('Table'[Order ID]))
Result is as below.
Best Regards,
Rico Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @v-rzhou-msft ,
Thanks for the solution it works perfectly.
However, I'm facing an issue now. For eg: the above DAX considers Manger+Inertnal Team and Internal Team+Manager as differnet entitites but they are same. The count should appear under only one category.
Could you please help me on this?
Thank you
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Check out the August 2024 Power BI update to learn about new features.
Learn from experts, get hands-on experience, and win awesome prizes.
User | Count |
---|---|
114 | |
79 | |
78 | |
47 | |
39 |
User | Count |
---|---|
147 | |
115 | |
65 | |
64 | |
53 |