The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.
Dear Community,
Initial Situation:
There is a table of multiple columns: btn_A to btn_D.
Sought Output as a new column:
The function should count how often a value such as "Interest" occurs in multiple columns. See Count_Interest
How can this be achieved?
Solved! Go to Solution.
Similarly
Count_Conversion = VAR RowValues = UNION ( ROW ( "MyTable", TableName[btn_A] ), ROW ( "MyTable", TableName[btn_B] ), ROW ( "MyTable", TableName[btn_C] ), ROW ( "MyTable", TableName[btn_D] ) ) RETURN COUNTROWS ( FILTER ( RowValues, [MyTable] = "Conversion" ) )
Hello,
I treied this but didn't work in power Query neither in DAX 😕
Try As a caclulated column
Count_Interest = VAR RowValues = UNION ( ROW ( "MyTable", TableName[btn_A] ), ROW ( "MyTable", TableName[btn_B] ), ROW ( "MyTable", TableName[btn_C] ), ROW ( "MyTable", TableName[btn_D] ) ) RETURN COUNTROWS ( FILTER ( RowValues, [MyTable] = "Interest" ) )
Similarly
Count_Conversion = VAR RowValues = UNION ( ROW ( "MyTable", TableName[btn_A] ), ROW ( "MyTable", TableName[btn_B] ), ROW ( "MyTable", TableName[btn_C] ), ROW ( "MyTable", TableName[btn_D] ) ) RETURN COUNTROWS ( FILTER ( RowValues, [MyTable] = "Conversion" ) )
User | Count |
---|---|
69 | |
68 | |
65 | |
54 | |
28 |
User | Count |
---|---|
112 | |
82 | |
65 | |
48 | |
43 |