The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
my fiscal year starts from 16-7-2-2023 to 15-7-2024 and when i create visuals in power bi do i need to create a separate months number based on fiscal year
suppose for the starting month 16-7-2023 15 days from july and 15 days from august or 15 days will be count as 1st month what is the best industries practise.
How can i create a dax for above usecase
Any help is appreciated
@sauravtibrewal
Please check this SQLBI Article that has plenty of information and explains very well your issue.
https://www.daxpatterns.com/custom-time-related-calculations/
I hope this helps, if so please accept it as a solution.
Kudos are welcome.
Hi @Poojara_D12
I can follow this approach to calculate fiscal month by defining month group in switch statement but i am looking something more dynamic
If u can think of any other approach plz do share
thanks for ur help
To handle your fiscal year starting from July 16, follow these steps:
FiscalMonth =
SWITCH(
TRUE(),
'Date'[Date] >= DATE(2023, 7, 16) && 'Date'[Date] <= DATE(2023, 7, 31), 1,
'Date'[Date] >= DATE(2023, 8, 1) && 'Date'[Date] <= DATE(2023, 8, 15), 1,
'Date'[Date] >= DATE(2023, 8, 16) && 'Date'[Date] <= DATE(2023, 8, 31), 2,
BLANK()
)
2. Fiscal Year:
FiscalYear =
IF(
MONTH('Date'[Date]) >= 7 && 'Date'[Date] >= DATE(YEAR('Date'[Date]), 7, 16),
YEAR('Date'[Date]) & "-" & YEAR('Date'[Date]) + 1,
YEAR('Date'[Date]) - 1 & "-" & YEAR('Date'[Date])
)
This ensures proper grouping for visuals.
Did I answer your question? Mark my post as a solution, this will help others!
If my response(s) assisted you in any way, don't forget to drop me a "Kudos" 🙂
Kind Regards,
Poojara
Data Analyst | MSBI Developer | Power BI Consultant
Consider Subscribing my YouTube for Beginners/Advance Concepts: https://youtube.com/@biconcepts?si=04iw9SYI2HN80HKS
User | Count |
---|---|
16 | |
8 | |
6 | |
6 | |
5 |
User | Count |
---|---|
23 | |
13 | |
13 | |
8 | |
8 |