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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
JorgeMolano
Frequent Visitor

Calculate value from a summarize table

Hi community,
I trying to build a Table Heatmap like the following image,

 

Power BI 3.PNG

 

But to achieve this I don´t get any way to calculate the "% NOI" value whit the data set I have. This is an example of my data set, as you can see the calculation need to be form the sum of all the Income of the Month by Categry and then obtain by simple rule of three the "% NOI".

Power BI 2.PNG

 

 

 

Power BI.PNG

 

¿Is there any way that I can create a calculete field insede my data set or some other methods to perform this?

Thanks 😄

1 ACCEPTED SOLUTION

Hi @camargos88 ,

Maybe this can help you. You could reference it to modify your formula based on the actual situation.

Income =
CALCULATE (
    SUM ( 'Table'[Total] ),
    FILTER (
        ALLEXCEPT ( 'Table', 'Table'[Category], 'Table'[Month] ),
        'Table'[Column] = "Income"
    )
)

Expense =
CALCULATE (
    SUM ( 'Table'[Total] ),
    FILTER (
        ALLEXCEPT ( 'Table', 'Table'[Category], 'Table'[Month] ),
        'Table'[Column] = "Expense"
    )
)

NOI = [Income] + [Expense]

% NOI = DIVIDE([NOI],[Income])

 

And you could take a look at the document: Use conditional formatting in tables to try customizing the background color.

Conditional formattingConditional formattingResultResult

You could download the attachment to learn more details.

Best Regards,
Xue Ding
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

5 REPLIES 5
camargos88
Community Champion
Community Champion

Hi @JorgeMolano ,

 

Try this code:

 

NOI =
VAR _noi_INCOME = CALCULATE(SUM('Table (2)'[Total]); 'Table (2)'[Column] = "Income")
VAR _noi_EXPENSE = CALCULATE(SUM('Table (2)'[Total]); 'Table (2)'[Column] = "Expense")

RETURN ((_noi_INCOME + _noi_EXPENSE) * 100) / _noi_INCOME / 100
 
Ricardo


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!



Hi @camargos88 ,

Maybe this can help you. You could reference it to modify your formula based on the actual situation.

Income =
CALCULATE (
    SUM ( 'Table'[Total] ),
    FILTER (
        ALLEXCEPT ( 'Table', 'Table'[Category], 'Table'[Month] ),
        'Table'[Column] = "Income"
    )
)

Expense =
CALCULATE (
    SUM ( 'Table'[Total] ),
    FILTER (
        ALLEXCEPT ( 'Table', 'Table'[Category], 'Table'[Month] ),
        'Table'[Column] = "Expense"
    )
)

NOI = [Income] + [Expense]

% NOI = DIVIDE([NOI],[Income])

 

And you could take a look at the document: Use conditional formatting in tables to try customizing the background color.

Conditional formattingConditional formattingResultResult

You could download the attachment to learn more details.

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

Hi,

 

This is exactly what I was looking for, now I know how to use this calculations.

Thanks so much for you'r help !!😉

 

 

Hi camargos88

 

I add this new column but it looks like only get 1 or  when is an Expense, and when I try to build the Table Heatmap only appears the  symbols.

 

Power BI 4.PNG

 

Regards!

Hi @JorgeMolano ,

 

It should be a measure, I won't work as calculated table.

 

Ricardo



Did I answer your question? Mark my post as a solution!

Proud to be a Super User!



Helpful resources

Announcements
June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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