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

The ultimate Microsoft Fabric, Power BI, Azure AI & SQL learning event! Join us in Las Vegas from March 26-28, 2024. Use code MSCUST for a $100 discount. 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
Fabric Community Conference

Microsoft Fabric Community Conference

Join us at our first-ever Microsoft Fabric Community Conference, March 26-28, 2024 in Las Vegas with 100+ sessions by community experts and Microsoft engineering.

February 2024 Update Carousel

Power BI Monthly Update - February 2024

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

Fabric Career Hub

Microsoft Fabric Career Hub

Explore career paths and learn resources in Fabric.

Fabric Partner Community

Microsoft Fabric Partner Community

Engage with the Fabric engineering team, hear of product updates, business opportunities, and resources in the Fabric Partner Community.

Top Solution Authors