Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
Anonymous
Not applicable

Matrix sub column addition

Hi,

This is how my Matrix looks like:

shiyam123_1-1646377106921.png

 

I would like to know if it is possible to add the sub columns individually as in for eg I need to have CEF total seperately and IMT/Resum total seperately in the same matrix.

For eg for the checker ID 7567, The CEF total would be 15(12+3) and IMT total for the same would be 9(4+5)

Is this possible?

eg output as in how it needs to look like for reference: 

shiyam123_3-1646377273132.png

Any help would be appreciated!

Thanks!

 

 

1 ACCEPTED SOLUTION
v-yangliu-msft
Community Support
Community Support

Hi  @Anonymous ,

I created some data:

vyangliumsft_0-1646811412660.png

Here are the steps you can follow:

1. Create calculated table.

Table 2 =
var _summarize=
SUMMARIZE(
    'Table',
    'Table'[Check ID],'Table'[Month],'Table'[Group],
    "amount",SUMX(FILTER(ALL('Table'),'Table'[Group]="CEF"&&'Table'[Check ID]=EARLIER('Table'[Check ID])),[amount]),
   "Name","Total_CEF"
    )
    return
    UNION('Table',_summarize)

vyangliumsft_1-1646811412662.png

2. Create a calculated table.

Table 3 =
var _summarize=
SUMMARIZE(
    'Table 2',
    'Table 2'[Check ID],'Table 2'[Month],'Table 2'[Group],
    "amount",SUMX(FILTER(ALL('Table'),'Table'[Group]=EARLIER('Table 2'[Group])&&'Table'[Check ID]=EARLIER('Table 2'[Check ID])),[amount]),
    "Name","Total_IMT"
    )
    return
    UNION('Table 2',_summarize)

3. Set Amount to Min.

vyangliumsft_2-1646811412663.png

4. Result:

vyangliumsft_3-1646811412666.png

Best Regards,

Liu Yang

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

View solution in original post

3 REPLIES 3
v-yangliu-msft
Community Support
Community Support

Hi  @Anonymous ,

I created some data:

vyangliumsft_0-1646811412660.png

Here are the steps you can follow:

1. Create calculated table.

Table 2 =
var _summarize=
SUMMARIZE(
    'Table',
    'Table'[Check ID],'Table'[Month],'Table'[Group],
    "amount",SUMX(FILTER(ALL('Table'),'Table'[Group]="CEF"&&'Table'[Check ID]=EARLIER('Table'[Check ID])),[amount]),
   "Name","Total_CEF"
    )
    return
    UNION('Table',_summarize)

vyangliumsft_1-1646811412662.png

2. Create a calculated table.

Table 3 =
var _summarize=
SUMMARIZE(
    'Table 2',
    'Table 2'[Check ID],'Table 2'[Month],'Table 2'[Group],
    "amount",SUMX(FILTER(ALL('Table'),'Table'[Group]=EARLIER('Table 2'[Group])&&'Table'[Check ID]=EARLIER('Table 2'[Check ID])),[amount]),
    "Name","Total_IMT"
    )
    return
    UNION('Table 2',_summarize)

3. Set Amount to Min.

vyangliumsft_2-1646811412663.png

4. Result:

vyangliumsft_3-1646811412666.png

Best Regards,

Liu Yang

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

amitchandak
Super User
Super User

@Anonymous , Parry2k has discussed a few such items on his channel. Please check video around calculation groups

https://www.youtube.com/perytus

Anonymous
Not applicable

Is it possible to achieve the same using power query?

 

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.