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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.