The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
Hi,
I am struggling to achieve something which seems quite simple!
I want to create a new table using DAX with distinct values of one column, and the value of one other column - in the original table there are multiple entries, but each has two different references which are the same of each row. See below example:
Original table
Ref1 Ref2 Amount
CDD ROO 34
CDD ROO 567
ABB TEE 467
ABB TEE 45
New Table
Ref1 Ref2
CDD ROO
ABB TEE
I can create the first column just using DISTINCT, but can't seem to return the other value. I tried LOOKUPVALUE but it returned blanks!
Any help greatly appreciated.
Thanks
David
Solved! Go to Solution.
Table = DISTINCT(SELECTCOLUMNS('Table',"Ref1",[Ref1],"Ref2",[Ref2]))
Thank you very much - both answers I have accepted as solutions!
Table = DISTINCT(SELECTCOLUMNS('Table',"Ref1",[Ref1],"Ref2",[Ref2]))
User | Count |
---|---|
83 | |
83 | |
37 | |
34 | |
32 |
User | Count |
---|---|
92 | |
79 | |
62 | |
53 | |
51 |