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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
dla005
Helper I
Helper I

Custom grand total (exclude membership)

Hello,

 

Is it possible to create a custom Grand total (EBITDA) in Power Bi that exclude certain financial line item in a single matrix table?

 

Currently I have a PL that consist of the below financial line items and I want EBITDA to exclude membership. Currently the only way i know how to get pass this and get the correct EBITDA is to create 2 matrix table - 1 for Membership by itself and 1 for Revenue/ Cost. However, i would prefer both being on the same matrix  table if possible.

 

1. Membership

2. Revenue

3. Cost of goods

4. EBITDA

1 ACCEPTED SOLUTION

Hi @dla005 ,

 

Please do like this.

1. Create an conditional column in 'Edit Query'.

 #"Added Conditional Column" = Table.AddColumn(#"Sorted Rows", "Custom", each if [F_L] = "Member" then 1 else if [F_L] = "Revenue" then 2 else if [F_L] = "Cost of Revenue" then 3 else if [F_L] = "OPEX" then 4 else 5),

v-lionel-msft_0-1604483841359.png

2. Sort the [F_L] column by the [Custom] column.

v-lionel-msft_1-1604483904703.png

At the end you will get the correct column sort.

v-lionel-msft_2-1604483966608.png

 

Best regards,
Lionel Chen

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

11 REPLIES 11
dla005
Helper I
Helper I

That works perfectly! Thank you so much for your help @v-lionel-msft ! I can finally finish my report lol

v-lionel-msft
Community Support
Community Support

Hi @dla005 ,

 

Like this?

v-lionel-msft_0-1603781852249.pngv-lionel-msft_1-1603781872587.png

 

Best regards,
Lionel Chen

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

Thank you @MFelix  and @v-lionel-msft for responding!

 

Per your sample above @v-lionel-msft it is exactly how I am set up right now, but I would like to combine both the Member and all the other line items in a single table with EBTIDA (total) not counting the member.

 

Please see example below, is it possible to make EBITDA 2 for budget (26-12-12) and 1 for actual (10-3-6). Thank you so much for your help!

 

dla005_0-1603783476213.png

 

Actua/Budget measure are the below. I do plan on adding variance and Variance % as well.

*Actual = CALCULATE(SUM(Data[Value]),FILTER(Data,Data[Budget/Actual]="Actual"))
*Actual = CALCULATE(SUM(Data[Value]),FILTER(Data,Data[Budget/Actual]="Budget"))

 

 

 

Hi @dla005 ,

 

Like this?

v-lionel-msft_0-1603876330939.png

 

Best regards,
Lionel Chen

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

 
 
 
 

Hi @v-lionel-msft ,

 

Thank you for taking your time to look at this.

 

The EBITDA result is exactly what I want but is it possible to include Members in that same table as well (14 members for Budget and 7 Members for Actuals) but for EBITDA to excude members when it is calculating. Below is the result i am looking for

 
 BudgetActual
Members147
Cost of Revenue-12-3
OPEX-12-6
Revenue2610
EBITDA21

 

The reason is because I am building a trended income statement and if i use 2 tables for members and other financial line items then the table would not line up properly. Thank you!

Hi @dla005 ,

 

Please refer to my .pbix file.

v-lionel-msft_0-1604393188997.png

 

Best regards,
Lionel Chen

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

 

 @v-lionel-msft @MFelix    Thank you so much for helping! Both method works perfectly and my only question is it possible to create a custom table for sorting? Since it is using Filter and && I don't think I can reference to a secondary table to create a custom sorting list. My goal is to have membership 1st, Revenue 2nd, Cost 3rd, etc.

 

If this is not possible then I can always create a sorting list in my main data table.

 

 

Thank you both for your time!

Hi @dla005 ,

 

Please do like this.

1. Create an conditional column in 'Edit Query'.

 #"Added Conditional Column" = Table.AddColumn(#"Sorted Rows", "Custom", each if [F_L] = "Member" then 1 else if [F_L] = "Revenue" then 2 else if [F_L] = "Cost of Revenue" then 3 else if [F_L] = "OPEX" then 4 else 5),

v-lionel-msft_0-1604483841359.png

2. Sort the [F_L] column by the [Custom] column.

v-lionel-msft_1-1604483904703.png

At the end you will get the correct column sort.

v-lionel-msft_2-1604483966608.png

 

Best regards,
Lionel Chen

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

Hi @dla005 

 

Try the following syntax:

 

Actual =
VAR Actuals_calc =
    CALCULATE (
        SUM ( Data[Value] ),
        FILTER ( Data; Data[Budget/Actual] = "Actuals" )
    )
VAR actuals_Excep_members =
    CALCULATE (
        SUM ( Data[Value] ),
        FILTER (
            Data,
            Data[Budget/Actual] = "Actuals"
                && Data[Financial Line] <> "Member"
        )
    )
RETURN
    IF (
        HASONEFILTER ( Data[Financial Line] ),
        Actuals_calc,
        actuals_Excep_members
    )

 

you may need to adjust the column names.


Regards

Miguel Félix


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

Proud to be a Super User!

Check out my blog: Power BI em Português



tex628
Community Champion
Community Champion

In your actual and budget calculation try the following:

Actual =
IF( SELECTEDVALUE([Financial Line]) = BLANK(), 
CALCULATE( SUM(Amount] , [Financial Line] <> "Membership" ) ,
SUM([Amount])
)


Let me know how it goes! 🙂 

Br,
J


Connect on LinkedIn
MFelix
Super User
Super User

Hi @dla005 ,

 

This depends on how you are maknig you calculations but if the Membership is a category in your models you need to Filter out the membership from the calculation.

 

Can you share a sample of your data and expected result?

 

Please see this post regarding How to Get Your Question Answered Quickly (courtesy of @Greg_Deckler) and How to provide sample data in the Power BI Forum (courtesy of @ImkeF).


Regards

Miguel Félix


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

Proud to be a Super User!

Check out my blog: Power BI em Português



Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

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.