Forum Discussion

punnas1's avatar
punnas1
Helper II
4 years ago
Solved

Revenue grouping

Hi,
I am trying to create a measure for the sum of sales by the group. I had tried the following DAX formula however it not working and showing total sale in each group)
Groups = CALCULATE([Revenue AC],FILTER(Groups,[Revenue AC]>=Groups[Min]&&[Revenue AC]<Groups[Max]))

 

 
 
  • Hi, punnas1 

     

    How did you get your Max and Min and is it as shown below?

    Column:

    Max = 
    CALCULATE(MAX('Groups'[Value]),FILTER('Groups',[Group Name]=EARLIER('Groups'[Group Name])))
    Min = 
    CALCULATE(Min('Groups'[Value]),FILTER('Groups',[Group Name]=EARLIER('Groups'[Group Name])))

    If your source data differs, please provide partial example data.

     

    Best Regards,

    Community Support Team _Charlotte

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

2 Replies

  • v-zhangti's avatar
    v-zhangti
    Community Support

    Hi, punnas1 

     

    How did you get your Max and Min and is it as shown below?

    Column:

    Max = 
    CALCULATE(MAX('Groups'[Value]),FILTER('Groups',[Group Name]=EARLIER('Groups'[Group Name])))
    Min = 
    CALCULATE(Min('Groups'[Value]),FILTER('Groups',[Group Name]=EARLIER('Groups'[Group Name])))

    If your source data differs, please provide partial example data.

     

    Best Regards,

    Community Support Team _Charlotte

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.