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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

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
Super User
Super User

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
Super User
Super User

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
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.