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

Win a FREE 3 Day Ticket to FabCon Vienna. Apply 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
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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