Forum Discussion

Etienne_1995's avatar
Etienne_1995
Frequent Visitor
2 years ago
Solved

summarize value by grouping

Hi there

 

I'd like to get the sum of the Column "Investment Budget Nr", without beeing split up into the value from the column "ID".

I tried it with SUMX and SUMMARIZE, but it still showed up the split up values, instead of the grouped sum of the Investment Budget Nr.

 

SUMX(

    SUMMARIZE(
    'Investment Request',
    'Investment Request'[Investment Budget Nr],
    'Investment Request'[Effective Price]),
    [Effective Price]
)

Any help would be appreciated.
  • Anonymous's avatar
    Anonymous
    2 years ago

    Hi Etienne_1995 ,

     

    I made simple samples and you can check the results below:

    Total by Nr = var _t = ADDCOLUMNS('Table',"Total by Nr",SUMX(FILTER(ALL('Table'),[Investment Budget Nr]=EARLIER([Investment Budget Nr])),[Effective Price]))
    RETURN SUMX(_t,[Total by Nr])

     

    An attachment for your reference. Hope it helps!

     

    Best regards,
    Community Support Team_ Scott Chang

     

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

2 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi Etienne_1995 ,

     

    I made simple samples and you can check the results below:

    Total by Nr = var _t = ADDCOLUMNS('Table',"Total by Nr",SUMX(FILTER(ALL('Table'),[Investment Budget Nr]=EARLIER([Investment Budget Nr])),[Effective Price]))
    RETURN SUMX(_t,[Total by Nr])

     

    An attachment for your reference. Hope it helps!

     

    Best regards,
    Community Support Team_ Scott Chang

     

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

  • Hi Etienne_1995 

     

    If you could share the expected output that would be easy to calculate. Still if my understanding is clear you need total sum of  Investment Budget Nr but not at Single ID level but for all the id's. please see the below output.

    for this yor can assume catgeory month is one unique id. and to calculate this you need to create this measure

    Measure = CALCULATE(SUM(Sheet1[Value]),ALL())
     
    or you take help from this video also: https://youtu.be/C8jjjujFeTE?si=_D2bo6-lCS6Wc55w
     
    Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
    Check for more intersing solution here: https://www.youtube.com/@letssolveproblem


    Regards