Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
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.
Solved! Go to 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
THANK YOU SO MUCH!!!! This worked like a charm!!!
Glad it worked 😊
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
User | Count |
---|---|
98 | |
90 | |
82 | |
73 | |
67 |
User | Count |
---|---|
115 | |
102 | |
98 | |
71 | |
67 |