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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
brunoguedes
Frequent Visitor

Calculate absolute profitability

 

 

Hello,

I'm new to power bi and my English sucks. I need a lot of help. I need to calculate the absolute profitability of a column with several values that are modified by the date. According to the image below:


Can someone help me?

Image.png

 

help!!!

 

2 ACCEPTED SOLUTIONS
Sean
Community Champion
Community Champion

@brunoguedesOkay so you want the percent calculated ALWAYS from the first date selected in the slicer!

 

Like in this picture... => % of First Selected Date's Total

% Of First Selected Date Total.png

 

So to achieve this create these 4 MEASURES

 

Total Value = SUM ( Table[Value] )

First Date = CALCULATE ( FIRSTNONBLANK ( Table[Date], 1 ), ALLSELECTED ( Table ) )
First Value =
CALCULATE (
    [Total Value],
    FILTER ( ALLSELECTED ( Table ), Table[Date] = [First Date] )
)
% MEASURE = IF ( HASONEVALUE ( Table[Date] ), DIVIDE ( [Total Value] - [First Value], [First Value], 0 ) )

Hope this helps.

Good Luck! Smiley Happy

View solution in original post

Very good! Very good!

Thank you very much!!!

View solution in original post

5 REPLIES 5
Sean
Community Champion
Community Champion

@brunoguedesYou can try couple things - both should give you the same answer!

 

1) Create a MEASURE with a formula that should look something like this...

% of Grand Total =
DIVIDE (
    SUM ( TableName[Column Name] ),
    CALCULATE ( SUM ( TableName[Column Name] ), ALLSELECTED ( TableName ) ),
    0
)

OR

2) Click to the right of the column name (the one with the numbers) and use the Quick Calculation option

 

% Of Grand Total.png

 

Hope this helps.

Good Luck! Smiley Happy

 

 

Thank you for your attention,

Did not work, the result should be like the one highlighted in the blue picture. Its result was like the columns highlighted in red. I need the% value to always depart from 0 in the first row - after filtering the date.

 

Image.png

Sean
Community Champion
Community Champion

@brunoguedesOkay so you want the percent calculated ALWAYS from the first date selected in the slicer!

 

Like in this picture... => % of First Selected Date's Total

% Of First Selected Date Total.png

 

So to achieve this create these 4 MEASURES

 

Total Value = SUM ( Table[Value] )

First Date = CALCULATE ( FIRSTNONBLANK ( Table[Date], 1 ), ALLSELECTED ( Table ) )
First Value =
CALCULATE (
    [Total Value],
    FILTER ( ALLSELECTED ( Table ), Table[Date] = [First Date] )
)
% MEASURE = IF ( HASONEVALUE ( Table[Date] ), DIVIDE ( [Total Value] - [First Value], [First Value], 0 ) )

Hope this helps.

Good Luck! Smiley Happy

brother,

I need to calculate interest accrued in the period, but now it will not start from the '' zero ''. Can you help me?

 

Image.png

Very good! Very good!

Thank you very much!!!

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.