Forum Discussion
Selecting Dates in Shift based data file
Dear Reader,
i'm stuck on the following. I have a data file with production time date (pieces), now i want to filter out the total amounts of the last shift. It is a 4 shift continous system someting like:
1 jan19 2jan19 3jan19 4jan19
morning A A C D
evening B B D B etc
now i need only the 'last' shift numbers, so figured, lets make a combination of date and shift (1jan19a etc) then try to filter last shift dates with something like: (this is year is collumn where is filter year=now())
this works, but now i need to add a selection for shifts A,B,C,D, so tried to test for shift a only with:
Based on your description, you may modify calculate column like pattern below:
test = VAR result = CALCULATE ( MAX ( TBM_PRODUCTION_DATA[Date + Shift NUM] ), FILTER ( TBM_PRODUCTION_DATA, TBM_PRODUCTION_DATA[This Year] = 1 && RELATED ( MES_Profile[Shift] ) = "A" ) ) RETURN IF ( ISBLANK ( result ), result, "Unreported" )Regards,
Jimmy Tao
1 Reply
- v-yuta-msftCommunity Support
Based on your description, you may modify calculate column like pattern below:
test = VAR result = CALCULATE ( MAX ( TBM_PRODUCTION_DATA[Date + Shift NUM] ), FILTER ( TBM_PRODUCTION_DATA, TBM_PRODUCTION_DATA[This Year] = 1 && RELATED ( MES_Profile[Shift] ) = "A" ) ) RETURN IF ( ISBLANK ( result ), result, "Unreported" )Regards,
Jimmy Tao