cancel
Showing results for 
Search instead for 
Did you mean: 

Fabric is Generally Available. Browse Fabric Presentations. Work towards your Fabric certification with the Cloud Skills Challenge.

Reply
sfsamperi13
Regular Visitor

Mark an id# based on if times are duplicates for certain parts from another column

Data looks like this:

 

DispatchID      Part     Created Date
1234                M         1/1/20 04:34:10 PM
1234                L          1/1/20 04:34:10 PM
1234                T          1/1/20 04:34:10 PM
1234                R          1/5/20 05:15:59 PM
1313                M         1/1/20 06:33:10 PM
1313                L           1/1/20 06:33:10 PM
1313                T           1/2/20 08:44:18 PM
2424               M           1/4/20 10:11:22 PM
2424               L             1/4/20 10:11:22 PM
2424               T             1/4/20 10:11:22 PM
2424               Q            1/7/20 08:10:40 PM

 

I want to find when all the parts for any DispatchID have the exact same times for certain parts. Below is the result i want to see if only considering parts - M,L,T:

DispatchID     Same Time Result

1234               yes
1313               no
2424               yes

 

Please assist with a measure I that would work.

1 ACCEPTED SOLUTION
FrankAT
Community Champion
Community Champion

Hi @sfsamperi13 

with your sample data I get the following solution:

 

14-10-_2020_23-16-15.png

Measure = 
VAR _Part_M = CALCULATE(MIN('Table'[Created Date]), 'Table'[Part] = "M")
VAR _Part_L = CALCULATE(MIN('Table'[Created Date]), 'Table'[Part] = "L")
VAR _Part_T = CALCULATE(MIN('Table'[Created Date]), 'Table'[Part] = "T")
RETURN
    IF(_Part_L = _Part_M && _Part_M = _Part_T, "Yes", "No")

 

With kind regards from the town where the legend of the 'Pied Piper of Hamelin' is at home
FrankAT (Proud to be a Datanaut)

View solution in original post

7 REPLIES 7
Icey
Community Support
Community Support

Hi @sfsamperi13 ,

 

Please let us know if the replies above are helpful.

 

If they are, please always accept the replies making sense as solution to your question so that people who may have the same question can get the solution directly.

 

If not, please give us more details.

 

 

Best Regards,

Icey

Megha166
Microsoft
Microsoft

@sfsamperi13 I don't understand your calculation. 1313 also has exactly same date as below then Why the result is "No"

 

1313                M         1/1/20 06:33:10 PM
1313                L           1/1/20 06:33:10 PM

Megha166_0-1602713123867.png

Please find the response.

Looks like I misread your question. Anyways you have the solutions 🙂

1313 is no because T does not have the same time as M and L. All 3 parts need to have the same time.

jdbuchanan71
Super User
Super User

@sfsamperi13 

Give this a try.

 

Same Time Result = 
IF ( DISTINCTCOUNT ( YourTable[Created Date] ) = 1, "yes", "no" )

jdbuchanan71_0-1602710606415.png

jdbuchanan71_1-1602710633401.png

 

 

 

FrankAT
Community Champion
Community Champion

Hi @sfsamperi13 

with your sample data I get the following solution:

 

14-10-_2020_23-16-15.png

Measure = 
VAR _Part_M = CALCULATE(MIN('Table'[Created Date]), 'Table'[Part] = "M")
VAR _Part_L = CALCULATE(MIN('Table'[Created Date]), 'Table'[Part] = "L")
VAR _Part_T = CALCULATE(MIN('Table'[Created Date]), 'Table'[Part] = "T")
RETURN
    IF(_Part_L = _Part_M && _Part_M = _Part_T, "Yes", "No")

 

With kind regards from the town where the legend of the 'Pied Piper of Hamelin' is at home
FrankAT (Proud to be a Datanaut)

Helpful resources

Announcements
PBI November 2023 Update Carousel

Power BI Monthly Update - November 2023

Check out the November 2023 Power BI update to learn about new features.

Community News

Fabric Community News unified experience

Read the latest Fabric Community announcements, including updates on Power BI, Synapse, Data Factory and Data Activator.

Power BI Fabric Summit Carousel

The largest Power BI and Fabric virtual conference

130+ sessions, 130+ speakers, Product managers, MVPs, and experts. All about Power BI and Fabric. Attend online or watch the recordings.

Top Solution Authors
Top Kudoed Authors