Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
Anupahwa
Regular Visitor

Grouping, powerbi

Hello everyone. I got the requirement in my project . I need to group the quatars based on condition. December to Feb should be quatar1 , then Feb to April quatar 2 and so on ...

To get the solution I created a calculated column in date table then I used switch 

Switch(true(),date calender month number in {12, 1,2},"PTqt1",date calender month number in {3,4,5},"PTQ2"......and I have added this to my date hierarchy .

Now the problem where I got stuck is ,if my client will use a slicer and if they drag year, and the PT quatar which I grouped into a slicer then they are the December month of current year 

Example : if year is selected 2020 and quatar1 so as per my condition it is showing December , Jan ,Feb months data but December should be 2019 , jan and Feb should be of 2020. How can I solve this problem ? 

1 ACCEPTED SOLUTION
Martin_D
Super User
Super User

Hi @Anupahwa ,

 

The standard pattern to solve this is called "fiscal year" (FY). It's very common, about 1/3 of all companies use it. Fiscal year - Wikipedia

Define with your users what should be the name of the fiscal year:

  • The calendar year in which the FY starts or
  • The calendar year in which the FY ends or
  • The calendar year that matches which the larger proportion of the FY or
  • Just name both years, like "FY23/24"

Now add another calculated column calculating the fiscal year name, similar to your custom quarter calculated column, and use the fiscal year in the slicer instead of the calendar year.

See this video for detailed instructions: Calculate Fiscal Year for a Date Dimension using DAX with Power BI (youtube.com)

 

Kind regards,

Martin

View solution in original post

3 REPLIES 3
Martin_D
Super User
Super User

Hi @Anupahwa ,

 

The standard pattern to solve this is called "fiscal year" (FY). It's very common, about 1/3 of all companies use it. Fiscal year - Wikipedia

Define with your users what should be the name of the fiscal year:

  • The calendar year in which the FY starts or
  • The calendar year in which the FY ends or
  • The calendar year that matches which the larger proportion of the FY or
  • Just name both years, like "FY23/24"

Now add another calculated column calculating the fiscal year name, similar to your custom quarter calculated column, and use the fiscal year in the slicer instead of the calendar year.

See this video for detailed instructions: Calculate Fiscal Year for a Date Dimension using DAX with Power BI (youtube.com)

 

Kind regards,

Martin

Thanks @Martin_D .It worked👍👍👍

Hi @Anupahwa ,

If it worked, would you please be so kind and accept this as solution?

Kind regards,

Martin

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.