Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Don'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.

Reply
Thiru
Regular Visitor

To determine the approval flow of an order placed

Hi,

 

I'm new to Power BI and facing issue in dtermining the Apprvoal Flow of an order. Please find the below data.

Order IDApprovers
123Manager
123Category Manager
123Interal Team
121Manager
121Internal Team
124Internal 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 FlowCount
Manager+Category Manager+Internal Team1
Manager+Internal Team1
Internal Team1

 

Any post regarding this would be appreciated.

Thank you

1 ACCEPTED 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.

vrzhoumsft_0-1686806201706.png

 

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.

 

View solution in original post

3 REPLIES 3
Thiru
Regular Visitor

I was able to restructe the data by adding 4 columns as shown below.

Order IDApproversCountManagerCategory ManagerInternal Team
123Manager3Manager  
123Category Manager3 Category Manager 
123Interal Team3  Interal Team
121Manager2Manager  
121Internal Team2  Interal Team
124Internal Team1  Interal Team

 

Count : 

COUNTROWS(FILTER('Approval Flow',EARLIER('Approval Flow'[Order ID])='Approval Flow'[Order ID]))
 
Not sure, if this would help. Please provide your suggestions.
Thank you

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.

vrzhoumsft_0-1686806201706.png

 

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  

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

Find out what's new and trending in the Fabric community.