Forum Discussion
CJ_96601
Helper V
7 years agoSum Value based on distinct record from other column
Need to sum up values of the largest amount based on badge number and based on selected year. Below is the sample table for easy reference. I appreciate your help Bold data (the largest of ...
PattemManohar
Community Champion
7 years agoCJ_96601 Hope you using above DAX to create as a new table.
CJ_96601
Helper V
7 years agoI use my table and repace the syntax with the proper column, field.
- PattemManohar7 years ago
Community Champion
CJ_96601 Ok, just for your reference
Test219Out --> NewTable Test219MaxSum --> Your Source Table or Existing Table
- CJ_966017 years ago
Helper V
If i understand you correctly, you want me to have a new table?
The data i have shared is just part of the so many records (15000 rows) and for that cannot create a new table.
Need to use existing table and show the visuals based on my requirements
- PattemManohar7 years ago
Community Champion
CJ_96601 Ok, if you don't want to create an another table (summarized). Then follow the below steps as an alternate method.
Please add a new column to your source table as below
MaxFlag = VAR _MaxVal = CALCULATE(MAX(Test219MaxSum[Amount]),FILTER(Test219MaxSum,Test219MaxSum[BadgeNo]=EARLIER(Test219MaxSum[BadgeNo]) && Test219MaxSum[Year] = EARLIER(Test219MaxSum[Year]))) RETURN IF(Test219MaxSum[Amount] = _MaxVal,"Y","N")
Then have a visual level filter as below.
Hope this helps !!