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
bitbit
Helper I
Helper I

How best to organise data query

My database is currently organised as follows:

CountryYearVersionCurrencyP&L lineMonthValue
ABC2018ActualLocal currencyNet SalesJanxx
ABC2018ActualEurNet SalesJanxxx

 

Country: 20 countries

Year: 2018-2022

Version: Actual, Budget

Currency: local, USD (conso)

P&L line: Sales to net profit

Month: Jan - Dec

Value = data

 

I want to create a P&L pivot table using Power Query to show MTD, YTD & Total Year, key ratios (eg. gross margin % sales etc) as well as the comparative variances (eg. actual vs budget vs prior years).  P&L is to be sliceable by country, currency, month.

 

I am unable to create calculated fields for key ratios (field "greyed out"). I also struggle to create DAX formula for MTD, YTD and Total Year.

 

Would greatly appreciate some advice on how to create this in the simplest way.

1 ACCEPTED SOLUTION
ALLUREAN
Solution Sage
Solution Sage

Hi, @bitbit 

You have 1 fact table. In best practice you should separate it by Dimension tables (e.g. PnL Line, Country, Date table etc). This can be achieved in a couple of ways (Power Query or Dax). Then dimension tables will be connected to your fact table, containing repeating values. Then you can create your time-intelligence measures like MTD/YTD based on your Date table and for P&L calculations also you can create measures to dynamically calculate Gross Margin for example (if not already calculated).

If you provide example file I can create a simple model and make some of the calculations, but this file should have the same structure of your original data in order to work




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


https://allure-analytics.com/
https://www.youtube.com/channel/UCndD_QZVNB_JWYLEmP6KrpA
https://www.linkedin.com/company/77757292/

Proud to be a Super User!




View solution in original post

1 REPLY 1
ALLUREAN
Solution Sage
Solution Sage

Hi, @bitbit 

You have 1 fact table. In best practice you should separate it by Dimension tables (e.g. PnL Line, Country, Date table etc). This can be achieved in a couple of ways (Power Query or Dax). Then dimension tables will be connected to your fact table, containing repeating values. Then you can create your time-intelligence measures like MTD/YTD based on your Date table and for P&L calculations also you can create measures to dynamically calculate Gross Margin for example (if not already calculated).

If you provide example file I can create a simple model and make some of the calculations, but this file should have the same structure of your original data in order to work




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


https://allure-analytics.com/
https://www.youtube.com/channel/UCndD_QZVNB_JWYLEmP6KrpA
https://www.linkedin.com/company/77757292/

Proud to be a 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.