Forum Discussion
Removing Duplicate Rows in Some Situations
- 7 years ago
Hi,
This DAX formula works
=SUMX(SUMMARIZE(VALUES(Table1[Address]),[Address],"ABCD",MIN(Table1[Count])),[ABCD])
Hope this helps.
Hi,
This DAX formula works
=SUMX(SUMMARIZE(VALUES(Table1[Address]),[Address],"ABCD",MIN(Table1[Count])),[ABCD])
Hope this helps.
- LimitedWisdom7 years agoNew Member
I think this is working...but what's the ABCD?
Would you be willing to walk through what all of the syntax is doing? I don't think I fully understand what each of those DAX keywords is doing...
- Ashish_Mathur7 years agoSuper User
Hi,
The SUMMARIZE() function creates a virtual table. The first input into this function is a Table - the VALUES() function returns a table of n rows and 1 column with all unique addresss. So with yoru dataset, it will return a Table of 4 rows and 1 column. Since there is only column in this Table, we can goup only by that one column. ABCD is the title of another column which we are creating in this virtual table. Within double quotes you can type any other meaningful name. Now in each row of this virtual table, under the ABCD column, we are computing the minimum value that appears in the Count column. The SUMX() function takes two inputs - Table and measure. The Table is the two column table returned by the SUMMARIZE() function. The measure is ABCD.
Hope this helps.
- LimitedWisdom7 years agoNew Member
Thanks so much Ashish_Mathur - by leveraging this bit of info, I made some great calculations elsewhere and the report looks great! I checked it with some SQL queries and confirmed everything. Really appreciate the quick replies and taking some extra time to explain the logic!