Are you sure you want to quit the chat?
In today’s data-driven business environment, organisations rely heavily on powerful data visualisation tools to analyse and interpret information to make informed decisions. One such tool is Power BI, a versatile business analytics solution that enables users to transform raw data into meaningful insights. A common requirement for businesses, especially in the finance sector, is to analyse data based on their fiscal year rather than the calendar year.
In this post, we will explore how to configure Power BI to display data in alignment with an organisation’s financial year using the DAX language, specifically focusing on how to create a financial calendar hierarchy for effective navigation and analysis.
In this scenario, the estimated close date field was utilized in a slicer to filter opportunities that were closed within a specific timeframe. By default, Power BI drills down the date field hierarchy into years, quarters, months, and days, displayed in accordance with the calendar year. However, organizations may prefer the date slicer to display the financial year instead. To accomplish this, we can employ the DAX language to generate a new table that divides years, quarters, months, and days according to the financial year, where the first quarter commences on the 1st of July rather than the 1st of January.
To implement this functionality, we will utilize the DAX language to create a new table called “Financial Calendar.”
The DAX expression would include the column names and the data reflected in those columns.
By establishing a one-to-many relationship between the new “Financial Calendar” table and the original “Est. closed date” field, the “Est. closed date” field can be configured to display the financial year in the slicer on the dashboard.
Calendar =
VAR StartYear = 2015
VAR EndYear = 2025
VAR YearStartMonth = 7 -- Define the starting month of the fiscal year
VAR QuarterMonths = {7, 10, 1, 4} -- Months indicating the start of each quarter
VAR CalendarDates = CALENDAR(DATE(StartYear, 1, 1), DATE(EndYear, 12, 31))
RETURN
ADDCOLUMNS(
CalendarDates,
"Year", YEAR([Date]),
"Month Name", FORMAT([Date],"MMMM"),
"Fiscal Month",
IF(Month([Date]) > 6, Month([Date]) - 6, Month([Date]) +6),
"Fiscal Quarter",
"QTR " & FORMAT(INT(DIVIDE(IF(Month([Date]) > 6, Month([Date]) - 6, Month([Date]) +6) + 2 , 3)),"#")
,
"Fiscal Year",
"FY " & RIGHT(IF(MONTH([Date]) >= YearStartMonth, YEAR([Date]), YEAR([Date]) - 1),2) & "/" & RIGHT( (IF(MONTH([Date]) >= YearStartMonth, YEAR([Date]), YEAR([Date]) - 1))+1,2),
"Month", MONTH([Date])
)
Power BI’s adaptability and the capabilities offered by DAX make it an invaluable resource for organisations seeking to analyse sales data within the context of their fiscal year. By creating a custom financial calendar hierarchy and establishing a relationship between the “Est. close date” field and a dedicated Fiscal Year table, organizations can gain a more accurate and comprehensive understanding of their sales performance. This approach enables businesses to align their data analysis with their specific financial cycles, leading to better-informed decisions and strategies that drive success in a competitive market.
Suggested Read: Optimizing Complex DATAVERSE-Semantic Models in Power BI
As part of the deduplication process, we also updated our reference table to reflect old-to-new key mappings. This allowed us to ensure that the correct GUIDs were assigned to the deduplicated records, maintaining the integrity of the data relationships in CRM.
At ITKnocks, we are more than an IT consulting company; we’re your strategic partner in business evolution. With a global footprint and a passion for technology, we craft innovative solutions, ensuring your success. Join us on a journey of excellence, where collaboration meets cutting-edge IT expertise.