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 |
---|---|
65 | |
60 | |
55 | |
54 | |
31 |
User | Count |
---|---|
180 | |
88 | |
72 | |
48 | |
46 |