Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
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 |
---|---|
76 | |
76 | |
41 | |
29 | |
24 |
User | Count |
---|---|
96 | |
91 | |
52 | |
46 | |
45 |