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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
boyddt_mn
Helper III
Helper III

User only the most current row of an order

Hello, thank you in advance for any help offered. I am trying to put together an WIP chart for our plant. Each order can have anywhere for 5 to 25 operations. We have 3 different measurements in Power BI - Due in 5 Days, Past Due, Aged that are based on the Wait Time column. I need to present a stacked bar chart with these three columns based on the last OpAc completed. Right now the graph is using all rows so for the example included it would list 11 entries as 'Due in 5 Days' and not a single entry. I will get my pbix file onto my dropbox this afternoon.

 

OrderMaterialOpAcPostg dateActual Release DateBasic finish dateMRP ControllerMRP_DescDepartmentWait Time
99999999XX.YYY.ZZZ-AA106/10/20206/9/20207/9/2020132Screw I V Line MetScrew 12
99999999XX.YYY.ZZZ-AA206/10/20206/9/20207/9/2020132Screw I V Line MetScrew 12
99999999XX.YYY.ZZZ-AA306/10/20206/9/20207/9/2020132Screw I V Line MetScrew 12
99999999XX.YYY.ZZZ-AA406/11/20206/9/20207/9/2020132Screw I V Line MetScrew 11
99999999XX.YYY.ZZZ-AA506/11/20206/9/20207/9/2020132Screw I V Line MetScrew 11
99999999XX.YYY.ZZZ-AA606/11/20206/9/20207/9/2020132Screw I V Line MetScrew 11
99999999XX.YYY.ZZZ-AA706/11/20206/9/20207/9/2020132Screw I V Line MetScrew 11
99999999XX.YYY.ZZZ-AA806/11/20206/9/20207/9/2020132Screw I V Line MetScrew 11
99999999XX.YYY.ZZZ-AA906/11/20206/9/20207/9/2020132Screw I V Line MetScrew 11
99999999XX.YYY.ZZZ-AA100NULL6/9/20207/9/2020132Screw I V Line MetScrew 1NULL
99999999XX.YYY.ZZZ-AA110NULL6/9/20207/9/2020132Screw I V Line MetScrew 1NULL
1 ACCEPTED SOLUTION

Hi @boyddt_mn ,

 

We can create three measures to replace the columns in Column values to meet your requirement.

 

5 Days measure = CALCULATE(DISTINCTCOUNT(SAP_WIP[Order]),FILTER(SAP_WIP,SAP_WIP[5 Days]=1))

 

Past Due measure = CALCULATE(DISTINCTCOUNT(SAP_WIP[Order]),FILTER(SAP_WIP,SAP_WIP[Past Due]=1))

 

Current measure = CALCULATE(DISTINCTCOUNT(SAP_WIP[Order]),FILTER(SAP_WIP,SAP_WIP[Current]=1))

 

 USER1.jpg

 

If it doesn’t meet your requirement, could you please show the exact expected result based on the table that you have shared?

BTW, pbix as attached.

 

Best regards,

 

Community Support Team _ zhenbw

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

5 REPLIES 5
v-zhenbw-msft
Community Support
Community Support

Hi @boyddt_mn ,

 

We have a little confused about your issue, what is the last OpAc completed.

And [Basic finish date] doesn’t contain the 5 days data, so there isn’t 11 entries as 'Due in 5 Days’.

 

Could you please show the exact expected result based on the table that you have shared?

It will be helpful if you can show us the exact expected result based on the tables.

 

Best regards,

 

Community Support Team _ zhenbw

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

I've updated both the the pbix files and the spreadsheet which shows a couple of orders that are 5 days and past due. Below is a snippet showing MRP Controller 112 and Order 9960. The graphic shows that for Past Due there 11 items when in fact there is a single order with 11 steps. I need the graphic to show only 1 for past due. Likewise for 5 Days, it shows 15 though it is a single order - 9959 - with 15 steps. The graphic should only show a single entry for 5 Days.

 

Let me know if there is anything else you need.

 

 

MRP Controller 112MRP Controller 112Order 9960Order 9960

Hi @boyddt_mn ,

 

We can create three measures to replace the columns in Column values to meet your requirement.

 

5 Days measure = CALCULATE(DISTINCTCOUNT(SAP_WIP[Order]),FILTER(SAP_WIP,SAP_WIP[5 Days]=1))

 

Past Due measure = CALCULATE(DISTINCTCOUNT(SAP_WIP[Order]),FILTER(SAP_WIP,SAP_WIP[Past Due]=1))

 

Current measure = CALCULATE(DISTINCTCOUNT(SAP_WIP[Order]),FILTER(SAP_WIP,SAP_WIP[Current]=1))

 

 USER1.jpg

 

If it doesn’t meet your requirement, could you please show the exact expected result based on the table that you have shared?

BTW, pbix as attached.

 

Best regards,

 

Community Support Team _ zhenbw

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

boyddt_mn
Helper III
Helper III

Here is the link to the files

 

https://www.dropbox.com/sh/d6gfg9kns6jdtpa/AAANNd305bBeWR3pHJCh-TEla?dl=0

 

The two files are Community_Example_SAPWIP.pbix & SAP_WIP.rpt.xlsx

 

Thank you for your help

aj1973
Community Champion
Community Champion

Hi @boyddt_mn 

Not sure what do you mean by last OpAc and/or depends on which of the dates in your table. However you can add the OpAc field to the pane filters and apply your needs on how you want your Visual to act

OpAC.PNG

 

Regards

 

Regards
Amine Jerbi

If I answered your question, please mark this thread as accepted
and you can follow me on
My Website, LinkedIn and Facebook

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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