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

Microsoft is giving away 50,000 FREE Microsoft Certification exam vouchers. Get Fabric certified for FREE! Learn more

Reply
jbuzaglu
Frequent Visitor

How to group by transaction ID and Tag

Hi all, so I have a unit table that brings sales data (including item IDs on each transaction, so I may have more than 2 rows per transactions). I have already grouped by transactions on another table, but I need to create a column on the other table thats tags whether a transaction contains a unit that was "yes" for GWP. So basically, when one of the units inside a transaction has GWP "Yes", that transaction should be classified as GWP transaction.

1 ACCEPTED SOLUTION

For a column, you can try like this?

Is GWP Transaction = 

var _TxID = 'Table1'[Transaction Number]
var _IsGWP = IF ( COUNTROWS( FILTER( all('Table1'), 'Table1'[Transaction Number] = _TxID && 'Table1'[GWP Unit] = "Yes")) > 0, "Yes", "No")

Return _IsGWP

View solution in original post

4 REPLIES 4
jbuzaglu
Frequent Visitor

THANK YOU SO MUCH!!!! This worked like a charm!!!

Glad it worked 😊

jbuzaglu
Frequent Visitor

jbuzaglu_0-1683313013359.png

 

For a column, you can try like this?

Is GWP Transaction = 

var _TxID = 'Table1'[Transaction Number]
var _IsGWP = IF ( COUNTROWS( FILTER( all('Table1'), 'Table1'[Transaction Number] = _TxID && 'Table1'[GWP Unit] = "Yes")) > 0, "Yes", "No")

Return _IsGWP

Helpful resources

Announcements
PBIApril_Carousel

Power BI Monthly Update - April 2025

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

Notebook Gallery Carousel1

NEW! Community Notebooks Gallery

Explore and share Fabric Notebooks to boost Power BI insights in the new community notebooks gallery.

April2025 Carousel

Fabric Community Update - April 2025

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

Top Solution Authors