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

Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.

Reply
Anonymous
Not applicable

Rolling up values within a grouping within the same table...

Hi All,

I want to rollup a value say FM (Fiscal Month) costs where I have a grouping in a Matrix visualuzation coming from the same table. So

for example:

 

customer              contract         FM01         FM02       FM03

navy  stores        1030                 5                   0                   200

                                                                0                    100            10

 

The goal is:

navy stores         1030                 5                   100            210

 

 

Thanks! 

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

Hi @Anonymous ,

 

We can use the following measure to meet your requirement:

 

 

Measure =
VAR cus =
    MAX ( 'Table'[contract] )
RETURN
    IF (
        cus = BLANK (),
        BLANK (),
        CALCULATE(
            SUM('Table'[value]),
            ALL('Table'[contract])
    )
)

 

 

Then we can get the result like this,

 

32.png

 


If it doesn't meet your requirement, kindly share your sample data and expected result to me if you don't have any Confidential Information. Please upload your files to OneDrive For Business and share the link here.


Best regards,

 

Community Support Team _ Dong Li
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-lid-msft
Community Support
Community Support

Hi @Anonymous ,

 

We can use the following measure to meet your requirement:

 

 

Measure =
VAR cus =
    MAX ( 'Table'[contract] )
RETURN
    IF (
        cus = BLANK (),
        BLANK (),
        CALCULATE(
            SUM('Table'[value]),
            ALL('Table'[contract])
    )
)

 

 

Then we can get the result like this,

 

32.png

 


If it doesn't meet your requirement, kindly share your sample data and expected result to me if you don't have any Confidential Information. Please upload your files to OneDrive For Business and share the link here.


Best regards,

 

Community Support Team _ Dong Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

Why are you using the MAX function on a charactor string?

Hi @Anonymous ,

 

The purpose we use MAX function here is to get the value of the current filter context.

Because column names cannot be called directly in a measure. So We use the MAX function to get the value of current column. We can also use MIN function, they have the same role in this question.

Here is a simple maybe help you to understand.

 

35.png

 

BTW, pbix as attached.


Best regards,

 

Community Support Team _ Dong Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.