Forum Discussion

kcoffman8's avatar
kcoffman8
Regular Visitor
1 year ago
Solved

Many to One Relationship Summarizing and Counting

Table 1 and Table 2 have a relationship by account ID, ideally I would like a Matrix as seen in the 3rd table. Thank you!
  • Aburar_123's avatar
    Aburar_123
    1 year ago

    Hi kcoffman8 ,

    you can change that measure to Calculated column as below if in case you want to use that calculated bracket as a Column in Matrix visual.

     

    Calculated Bracket =
    var total_value = SUMX(FILTER('Table A','Table A'[Account Id]=EARLIER('Table A'[Account Id])),'Table A'[Value])
    return SWITCH(TRUE(),total_value<=5000,"5k or Less",total_value>5000 && total_value<=10000,"5k - 10K",total_value>10000 && total_value<=15000,"10k - 15K")
     

     

    FYI... below is the base table structure that i am using,