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

Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!

Reply
Waqas_BIspecs
Frequent Visitor

Help Needed

Hi, 

In the below image you can see i have a pallet_id_from column where there are multiple instances appearing against these in if_tran_code column. i was to create another calculated column where i can mark all these instances against the Pallet-_id as "Shipped" if there there is one instance i.e. "FO-LOAD" exists against this column. 

 

Waqas_BIspecs_0-1694102648604.png

 

Note: This data is coming through Direct Query from SQL.

Required Output:

Waqas_BIspecs_1-1694103169195.png

 

Thank you

2 ACCEPTED SOLUTIONS
tamerj1
Community Champion
Community Champion

Hi @Waqas_BIspecs 

Please try

Status =
IF (
"FO-LOAD"
IN CALCULATETABLE (
VALUES ( 'Table'[if_tran_code] ),
ALLEXCEPT ( 'Table', 'Table'[pallet_id_from] )
),
"Shipped"
)

View solution in original post

@Waqas_BIspecs 

Yes you are right. The small sample of data was a little misleading. You need to add activity-date to ALLEXCEPT 

Status =
IF (
"FO-LOAD"
IN CALCULATETABLE (
VALUES ( 'Table'[if_tran_code] ),
ALLEXCEPT ( 'Table', 'Table'[pallet_id_from], 'Table'[activity-date] )
),
"Shipped"
)

View solution in original post

3 REPLIES 3
Waqas_BIspecs
Frequent Visitor

Hi, 

 

Its making everything "shipped"

@Waqas_BIspecs 

Yes you are right. The small sample of data was a little misleading. You need to add activity-date to ALLEXCEPT 

Status =
IF (
"FO-LOAD"
IN CALCULATETABLE (
VALUES ( 'Table'[if_tran_code] ),
ALLEXCEPT ( 'Table', 'Table'[pallet_id_from], 'Table'[activity-date] )
),
"Shipped"
)

tamerj1
Community Champion
Community Champion

Hi @Waqas_BIspecs 

Please try

Status =
IF (
"FO-LOAD"
IN CALCULATETABLE (
VALUES ( 'Table'[if_tran_code] ),
ALLEXCEPT ( 'Table', 'Table'[pallet_id_from] )
),
"Shipped"
)

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

Vote for your favorite vizzies from the Power BI World Championship submissions!

Sticker Challenge 2026 Carousel

Join our Community Sticker Challenge 2026

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

January Power BI Update Carousel

Power BI Monthly Update - January 2026

Check out the January 2026 Power BI update to learn about new features.

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.