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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
szub
Helper III
Helper III

Need to identify if a serial number has had certain types of claims and then be able to filter by it

Hello,

 

I am trying to create a column on a Sales table to identify if a serial number has had an Install, a Startup OR Install & Startup claim from a Claim table.  The two tables are joined by the serial number.  Below is sample data and the output I am looking for.  I need to be able to be able to use this for a slicer to filter by units that had an Install, a Startup OR Install & Startup claim.  

 

I am trying to get this done tonight and I am hoping someone can help me. 

 

Thank you in advance!

 

Sales Table

Serial #Ship Date
Serial11/15/2018
Serial211/15/2018
Serial32/27/2019
Serial41/28/2017
Serial52/15/2018
Serial67/26/2019
Serial710/1/2019
Serial81/2/2020

 

Claim Table

Serial #Claim #Claim TypeClaim Date
Serial1Claim1Install2/1/2018
Serial1Claim2Startup2/2/2018
Serial1Claim3Warranty1/13/2019
Serial2Claim4Install3/14/2019
Serial3Claim5Warranty3/6/2019
Serial4Claim8Startup3/5/2017
Serial4Claim10Warranty12/21/2018
Serial5Claim11Install3/12/2018
Serial5Claim12Startup7/31/2018
Serial5Claim13Warranty1/22/2019

 

Desired Output

Serial #Ship DateInstall/Startup
Serial11/15/2018Install & Startup
Serial211/15/2018Install
Serial32/27/2019 
Serial41/28/2017Startup
Serial52/15/2018Install & Startup
Serial67/26/2019 
Serial710/1/2019 
Serial81/2/2020 
1 ACCEPTED SOLUTION
VasTg
Memorable Member
Memorable Member

@szub 

 

Try this.

 

Column = 
VAR A = RELATEDTABLE(Claim)
VAR INS = CALCULATE(COUNT(Claim[Claim #]),FILTER(A,Claim[Claim Type]="Install"))
VAR ST = CALCULATE(COUNT(Claim[Claim #]),FILTER(A,Claim[Claim Type]="Startup"))
RETURN SWITCH(
    TRUE(),
    INS > 0 && ST > 0,"Install & Startup",
    INS > 0, "Install",
    ST > 0, "Startup",
    BLANK()
    )

 

See below.

image.png

 

If it helps, mark it as a solution

Kudos are nice too

 

Connect on LinkedIn

View solution in original post

2 REPLIES 2
VasTg
Memorable Member
Memorable Member

@szub 

 

Try this.

 

Column = 
VAR A = RELATEDTABLE(Claim)
VAR INS = CALCULATE(COUNT(Claim[Claim #]),FILTER(A,Claim[Claim Type]="Install"))
VAR ST = CALCULATE(COUNT(Claim[Claim #]),FILTER(A,Claim[Claim Type]="Startup"))
RETURN SWITCH(
    TRUE(),
    INS > 0 && ST > 0,"Install & Startup",
    INS > 0, "Install",
    ST > 0, "Startup",
    BLANK()
    )

 

See below.

image.png

 

If it helps, mark it as a solution

Kudos are nice too

 

Connect on LinkedIn

@VasTg  - that worked!  Thank you so much for  your quick reply!

Helpful resources

Announcements
FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors