Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
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.
Note: This data is coming through Direct Query from SQL.
Required Output:
Thank you
Solved! Go to Solution.
Please try
Status =
IF (
"FO-LOAD"
IN CALCULATETABLE (
VALUES ( 'Table'[if_tran_code] ),
ALLEXCEPT ( 'Table', 'Table'[pallet_id_from] )
),
"Shipped"
)
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"
)
Hi,
Its making everything "shipped"
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"
)
Please try
Status =
IF (
"FO-LOAD"
IN CALCULATETABLE (
VALUES ( 'Table'[if_tran_code] ),
ALLEXCEPT ( 'Table', 'Table'[pallet_id_from] )
),
"Shipped"
)
User | Count |
---|---|
25 | |
12 | |
8 | |
6 | |
6 |
User | Count |
---|---|
26 | |
12 | |
11 | |
10 | |
6 |