Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
3 years ago
Solved

Sum Row by Row and Bin values into groups

Hi, I have a raw data set where there are multiple lines for each Project ID and Country. I then grouped this data by Project ID & Country (Market), and aggregated all NTSLC$ values. This is my "Pro...
  • lukiz84's avatar
    3 years ago
    NTSLC SUMS =
    VAR selectedRangeMin = SELECTEDVALUE('Proj Value Rank'[MinValue Range])
    VAR selectedRangeMax = SELECTEDVALUE('Proj Value Rank'[MaxValue Range])
    IF (
        HASONEVALUE ( 'Proj Value Rank'[MinValue Range] ),
        CALCULATE (
           SUM ( 'Proj Aggregation Test'[Sum NTSLC] ),
           FILTER('Proj Aggregation Test',
              'Proj Aggregation Test'[Sum NTSLC] => selectedRangeMin &&
              'Proj Aggregation Test'[Sum NTSLC] < selectedRangeMax
           )
        )      
    )