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
paolomint
Helper III
Helper III

Standard Financial report

Hello everyone,

I'm working on a financial report in Power Bi.

Unfortunately my boss also ask for a traditional overview of the data.

This my table:

 

Cattura 2.JPG

 

 

 

 

I need to add, EBITDA and EBIT: 

EBITDA = REVENUES - DIRECT COST - INDIRECT COST

EBIT = EBITDA - CAPEX

Cattura.JPG

 

 

 

 

 

 

I know it sound excel, but what we can do when someone ask for a basic view like this?

I know how to calcultate DAX measures, but I don't know how to arrange data and measures in a standard table like the second one.

Thanks for you help.

Paolo 

1 ACCEPTED SOLUTION

Hi, @paolomint 

 

Based on your description, I add new data in the table.

Table:

g1.png

Test:

g2.png

 

Year(a calculated table):

 

Year = DISTINCT('Table'[Year])

 

 

Here are the measures.

 

CurrentYear = 
var _info = SELECTEDVALUE(Test[Info])
var _year = SELECTEDVALUE('Year'[Year])
var _revenues = 
CALCULATE(
        SUM('Table'[Revenues]),
        FILTER(
            ALLSELECTED('Table'),
            'Table'[Year] = _year
        )
)
var _directcost = 
CALCULATE(
        SUM('Table'[Direct cost]),
        FILTER(
            ALLSELECTED('Table'),
            'Table'[Year] = _year
        )
)
var _indirectcost = 
CALCULATE(
        SUM('Table'[Indirect cost]),
        FILTER(
            ALLSELECTED('Table'),
            'Table'[Year] = _year
        )
)
var _capex = 
CALCULATE(
    SUM('Table'[Capex]),
    FILTER(
        ALLSELECTED('Table'),
        'Table'[Year] = _year
    )
)
return
SWITCH(
    TRUE(),
    _info = "Revenues",
    _revenues,
    _info = "Direct cost",
    _directcost,
    _info = "Indirect cost",
    _indirectcost,
    _info = "Ebitda",
    _revenues-_directcost-_indirectcost,
    _info = "Capex",
    _capex,
    _info = "Ebit",
    _revenues-_directcost-_indirectcost-_capex,
    BLANK()
)

LastYear = 
var _info = SELECTEDVALUE(Test[Info])
var _year = SELECTEDVALUE('Year'[Year])-1
var _revenues = 
CALCULATE(
        SUM('Table'[Revenues]),
        FILTER(
            ALLSELECTED('Table'),
            'Table'[Year] = _year
        )
)
var _directcost = 
CALCULATE(
        SUM('Table'[Direct cost]),
        FILTER(
            ALLSELECTED('Table'),
            'Table'[Year] = _year
        )
)
var _indirectcost = 
CALCULATE(
        SUM('Table'[Indirect cost]),
        FILTER(
            ALLSELECTED('Table'),
            'Table'[Year] = _year
        )
)
var _capex = 
CALCULATE(
    SUM('Table'[Capex]),
    FILTER(
        ALLSELECTED('Table'),
        'Table'[Year] = _year
    )
)
return
SWITCH(
    TRUE(),
    _info = "Revenues",
    _revenues,
    _info = "Direct cost",
    _directcost,
    _info = "Indirect cost",
    _indirectcost,
    _info = "Ebitda",
    _revenues-_directcost-_indirectcost,
    _info = "Capex",
    _capex,
    _info = "Ebit",
    _revenues-_directcost-_indirectcost-_capex,
    BLANK()
)

Diff = [CurrentYear]-[LastYear]

Result rate = 
DIVIDE(
    [CurrentYear]-[LastYear],
    [LastYear]
)

 

 

You may use a matrix visual to display the result.

g3.png

 

Best Regards

Allan

 

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

7 REPLIES 7
v-alq-msft
Community Support
Community Support

Hi, @paolomint 

 

Based on your description, I created data to reproduce your scenario.

Table:

a1.png

 

Test:

a2.png

 

You may create four measures as below.

 

2019 = 
var _info = SELECTEDVALUE(Test[Info])
var _revenues = 
CALCULATE(
        SUM('Table'[Revenues]),
        FILTER(
            ALLSELECTED('Table'),
            'Table'[Year] = 2019
        )
)
var _directcost = 
CALCULATE(
        SUM('Table'[Direct cost]),
        FILTER(
            ALLSELECTED('Table'),
            'Table'[Year] = 2019
        )
)
var _indirectcost = 
CALCULATE(
        SUM('Table'[Indirect cost]),
        FILTER(
            ALLSELECTED('Table'),
            'Table'[Year] = 2019
        )
)
var _capex = 
CALCULATE(
    SUM('Table'[Capex]),
    FILTER(
        ALLSELECTED('Table'),
        'Table'[Year] = 2019
    )
)
return
SWITCH(
    TRUE(),
    _info = "Revenues",
    _revenues,
    _info = "Direct cost",
    _directcost,
    _info = "Indirect cost",
    _indirectcost,
    _info = "Ebitda",
    _revenues-_directcost-_indirectcost,
    _info = "Capex",
    _capex,
    _info = "Ebit",
    _revenues-_directcost-_indirectcost-_capex,
    BLANK()
)
2020 = 
var _info = SELECTEDVALUE(Test[Info])
var _revenues = 
CALCULATE(
        SUM('Table'[Revenues]),
        FILTER(
            ALLSELECTED('Table'),
            'Table'[Year] = 2020
        )
)
var _directcost = 
CALCULATE(
        SUM('Table'[Direct cost]),
        FILTER(
            ALLSELECTED('Table'),
            'Table'[Year] = 2020
        )
)
var _indirectcost = 
CALCULATE(
        SUM('Table'[Indirect cost]),
        FILTER(
            ALLSELECTED('Table'),
            'Table'[Year] = 2020
        )
)
var _capex = 
CALCULATE(
    SUM('Table'[Capex]),
    FILTER(
        ALLSELECTED('Table'),
        'Table'[Year] = 2020
    )
)
return
SWITCH(
    TRUE(),
    _info = "Revenues",
    _revenues,
    _info = "Direct cost",
    _directcost,
    _info = "Indirect cost",
    _indirectcost,
    _info = "Ebitda",
    _revenues-_directcost-_indirectcost,
    _info = "Capex",
    _capex,
    _info = "Ebit",
    _revenues-_directcost-_indirectcost-_capex,
    BLANK()
)
Diff = [2020]-[2019]
Result rate = 
DIVIDE(
    [2020]-[2019],
    [2019]
)

 

 

Result:

a3.png

 

Best Regards

Allan

 

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

Hi Allan,

(@v-alq-msft)

 

Thank you very much for you reply, it's a fantastic solution.

before to accept it, whereas you reply is extremely clear, I try to make a step forward, describing a daily situation to understand if the model could easly become a general solution that work with time intelligence. 

 

You completely reply to my question, today my boss is satisfied 😉

but in my easy model there are only 2 years, 2019/2020, following your procedure, in 2021 I have to add new measures,

if the boss ask for quarter or months instead of year, I have to create several new measures.

 

Attached you can find a "picture" of a standard data model to obtain a financial report.

Is it possible to make a Power Bi model that can work with time intelligence? 

For example the result could be a table with time (Year, quarter or month) that come from Datetime table.

This way we can also use YTD/MTD formula

 

Thank you very much for your very professional reply

Paolo

 

 

20200430_084106.jpg

Hi, @paolomint 

 

Based on your description, I add new data in the table.

Table:

g1.png

Test:

g2.png

 

Year(a calculated table):

 

Year = DISTINCT('Table'[Year])

 

 

Here are the measures.

 

CurrentYear = 
var _info = SELECTEDVALUE(Test[Info])
var _year = SELECTEDVALUE('Year'[Year])
var _revenues = 
CALCULATE(
        SUM('Table'[Revenues]),
        FILTER(
            ALLSELECTED('Table'),
            'Table'[Year] = _year
        )
)
var _directcost = 
CALCULATE(
        SUM('Table'[Direct cost]),
        FILTER(
            ALLSELECTED('Table'),
            'Table'[Year] = _year
        )
)
var _indirectcost = 
CALCULATE(
        SUM('Table'[Indirect cost]),
        FILTER(
            ALLSELECTED('Table'),
            'Table'[Year] = _year
        )
)
var _capex = 
CALCULATE(
    SUM('Table'[Capex]),
    FILTER(
        ALLSELECTED('Table'),
        'Table'[Year] = _year
    )
)
return
SWITCH(
    TRUE(),
    _info = "Revenues",
    _revenues,
    _info = "Direct cost",
    _directcost,
    _info = "Indirect cost",
    _indirectcost,
    _info = "Ebitda",
    _revenues-_directcost-_indirectcost,
    _info = "Capex",
    _capex,
    _info = "Ebit",
    _revenues-_directcost-_indirectcost-_capex,
    BLANK()
)

LastYear = 
var _info = SELECTEDVALUE(Test[Info])
var _year = SELECTEDVALUE('Year'[Year])-1
var _revenues = 
CALCULATE(
        SUM('Table'[Revenues]),
        FILTER(
            ALLSELECTED('Table'),
            'Table'[Year] = _year
        )
)
var _directcost = 
CALCULATE(
        SUM('Table'[Direct cost]),
        FILTER(
            ALLSELECTED('Table'),
            'Table'[Year] = _year
        )
)
var _indirectcost = 
CALCULATE(
        SUM('Table'[Indirect cost]),
        FILTER(
            ALLSELECTED('Table'),
            'Table'[Year] = _year
        )
)
var _capex = 
CALCULATE(
    SUM('Table'[Capex]),
    FILTER(
        ALLSELECTED('Table'),
        'Table'[Year] = _year
    )
)
return
SWITCH(
    TRUE(),
    _info = "Revenues",
    _revenues,
    _info = "Direct cost",
    _directcost,
    _info = "Indirect cost",
    _indirectcost,
    _info = "Ebitda",
    _revenues-_directcost-_indirectcost,
    _info = "Capex",
    _capex,
    _info = "Ebit",
    _revenues-_directcost-_indirectcost-_capex,
    BLANK()
)

Diff = [CurrentYear]-[LastYear]

Result rate = 
DIVIDE(
    [CurrentYear]-[LastYear],
    [LastYear]
)

 

 

You may use a matrix visual to display the result.

g3.png

 

Best Regards

Allan

 

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

 

Hi Allan,

@v-alq-msft 

 

thank for your reply.

As far I can see, there is no way to use "Automatically" time intelligence.

 

If I have to compare 2 years I will follow the example (2 calculation blocks: CurrentYear and LastYear)

If I have to compare by quarter, I will write 4 blocks (Q1-Q2-Q3-Q4)

If I have to compare by months; I will write 12 blocks (Jannuary, Febrary, March...)

 

is It correct?

Anonymous
Not applicable

Hi @paolomint,

 

I was working for years in Finance and this is one of the problems: managers are not able to change the old fashioned way to show the capabilities of Power BI. 

 

To refer to your tables there, I think you the simplest way is to calculate Earnings before interest and taxes, depreciation and amortization in excel and EBIT with a simple formula or if you would like you can calculate in Power BI.

To do that in a simple way:

go to column which you want to calculate - right click - new quick measure and there you can choose the calculation type and the columns easily. 

Than in Power BI you can just choose table to show the same format as in excel for your boss.

 

To simplify this I would go with calculation in Excel and present in Power BI.

 

Let me know if this helped. If helped please give a kudos and accept as solution,

 

Thanking you 

Alin Oprita

nandukrishnavs
Super User
Super User

@paolomint 

 

You could define another table and add the required measures into the column. 

 

a.JPG

 

Drag this column values into matrix visual.

 

Then create a new measure and switch the measure based on selected row.

 

Please refer to this link https://visualbi.com/blogs/microsoft/powerbi/dynamic-measure-selection-power-bi/

 



Did I answer your question? Mark my post as a solution!
Appreciate with a kudos
🙂

 


Regards,
Nandu Krishna

amitchandak
Super User
Super User

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.