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.
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:
I need to add, EBITDA and EBIT:
EBITDA = REVENUES - DIRECT COST - INDIRECT COST
EBIT = EBITDA - CAPEX
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
Solved! Go to Solution.
Hi, @paolomint
Based on your description, I add new data in the table.
Table:
Test:
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.
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, @paolomint
Based on your description, I created data to reproduce your scenario.
Table:
Test:
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:
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,
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
Hi, @paolomint
Based on your description, I add new data in the table.
Table:
Test:
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.
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,
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?
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
You could define another table and add the required measures into the column.
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 🙂
@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
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
112 | |
100 | |
77 | |
74 | |
49 |
User | Count |
---|---|
146 | |
108 | |
106 | |
90 | |
62 |