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 Please update your Measure logic as below and use your Year field as a filter.
Test219 = VAR _Total = SUMX(SUMMARIZE(Test219MaxSum,Test219MaxSum[BadgeNo],Test219MaxSum[Year],"Amount",MAX(Test219MaxSum[Amount])),[Amount]) RETURN IF(HASONEFILTER(Test219MaxSum[Year]),SUMX(DISTINCT(Test219MaxSum[BadgeNo]),CALCULATE(MAXX(Test219MaxSum,Test219MaxSum[Amount]))),_Total)
CJ_96601
Helper V
7 years agoFurthermore, if i make a relationship (Year), if i click year 2020, the result is zero , null, as there is no record in 2020. What i would like to have is to have 2019 sum even if i click 2020.
Regards,