HI Everyone,
I want to ask regarding using the
DISTINCT and FILTER function, so I want to calculate the
SUM for Rating column, based on the filter in the SubscriptionClassification, which contain two filter value C
OMPLIANT and NOT_APPLICABLE (
the NOT_APPLICLABLE could not be seen in the picture here) .
Then I need to SUM the based only
distinct value in column Control ID, so basically only one row.
I have tried multiple way but nothing works, I create two or three separate
Measure, one for the FILTER and other for the DISTINCT, and other for the MAX value for Rating column(
I got this suggestion from Youtube i found)
The best solution I can currently find is here:
1. I put firstly the Max RATING formula : Max control Rating = MAX( Table1[Rating] )
2. then put the : Sum Distinct = SUMX(DISTINCT( Table1[Control ID] ), Table1 [Max control Rating] )
3. then put : FILTER Control ID = SUMX( FILTER(Sheet1, OR( Table1[SubscriptionClassification] = "COMPLIANT" , Table1[SubscriptionScore] = "NOT_APPLICABLE") ), Sheet1[Sum Distinct] )
but the third step give an error when I try to put in diagram or table visualization.
However, funny things it works properly with AVERAGEX functionwith:
1. AverageFilter = AVERAGEX ( FILTER( Sheet1 , OR (Table1[SubscriptionClassification] = "COMPlIANT" , Table1[SubscriptionClassification] = "NOT_APPLICABLE")) , Table1[Rating])
2. then put : Distinct Average Control ID = AVERAGEX(DISTINCT( Table1 [Control ID]), Table1 [AverageFilter2])
------------------------------
Iman Arrovi
Intern/Trainee
------------------------------