Forum Discussion

wlandry12's avatar
wlandry12
Frequent Visitor
4 years ago
Solved

Assigning a Production Route Status to AssemblyID

I am struggling to work out the logic for assigning an overall route status to production assemblies and display them in a table visual.

 

All assemblies are assigned a route that consists of specific stations along the production line. The completion of a route depends upon the completion of the full quantity of the assembly at each station within that route. The desired statuses are as follows:

 

Not Started - Zero quantity completed at any and all stations in route

Complete - Full quantity completed at all stations in route

In Progress - Any quantity > 0 completed at any station in route

 

I have a database table (StationSummary) that lists the completed station quantity for each station an assembly is routed to. Here's a sample of some of the data from that table:

 

AssemblyIDStationIDStationTypePositionInRouteTotalQtyQtyCompletePrevStationIDNextStationID
55055160211724
5505512413106 
5505592413106 
55055960210724
55055060210724
55055970110 6
5505502413106 
55055070111 6
55055170111 6

 

Ignoring the status of StationID 24, which is not a production station (StationType = 0), the status output should look like this:

 

AssemblyIDStatus
550550In Progress
550551Complete
550559Not Started

 

I'm thinking I would need a DAX column either on the StationSummary table or on the Assembly table, but I don't know how to write it to check the station status of multiple rows and combine it into a single route status for the assembly.

5 Replies

    • wlandry12's avatar
      wlandry12
      Frequent Visitor

      Thanks for your response, Ashish. I tried using the DAX from your sample file in my report, but it appears to be incompatible with data from related tables. In the table visual I am using the Assembly Mark from the related Assemblies table instead of AssemblyID, which is more familiar to the user. I also have slicers for Job # and Sequence from two other related tables (Jobs & Sequences). Using your "Measure" measure as the status column in the table visual seemingly breaks the ability to filter with these slicers, as the full database of Assembly Marks now shows in the table visual.  

       

      Additionally, I would prefer to filter the stations by StationType = 0 rather than StationID<>24. This is because Field stations (StationType = 1) may be added in the future, and they should never be included in the Production status.

      • Ashish_Mathur's avatar
        Ashish_Mathur
        Icon for Super User rankSuper User

        You are welcome.  In your original post, you never mentioned that you had multiple tables.  How would i be expetced to know that?  If you need my help, please share the link from where i can download your PBI file and build the table/slicers that you want.  I will write the measure.