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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

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
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

AugPowerBI_Carousel

Power BI Monthly Update - August 2024

Check out the August 2024 Power BI update to learn about new features.

September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

Sept NL Carousel

Fabric Community Update - September 2024

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