cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
paolomint
Helper II
Helper II

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.

 

View solution in original post

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 II
Super User II

@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
🙂

 

amitchandak
Super User IV
Super User IV

@paolomint , Are these measures or dimension values. If measure use "Show on Row" in matrix

https://www.burningsuit.co.uk/blog/2019/04/7-secrets-of-the-matrix-visual/

 

Or refer, if this can help: https://community.powerbi.com/t5/Desktop/Traditional-Financial-Statements/td-p/7223

 



Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
Dashboard of My Blogs !! YouTube Channel !! Connect on Linkedin

Proud to be a Super User!

Helpful resources

Announcements
PBI User Groups

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group!

MBAS on Demand

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

July 2021 Update 768x460.png

Check it out!

Click here to read more about the July 2021 Updates

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

Top Solution Authors
Top Kudoed Authors