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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
Nitin03
Frequent Visitor

Last N months from selected month and year

final.png

 

 

Hi experts need your help.
Indian financial year start from April and end on March. So what i need when I will select Fiscal Year 2018-19 in slicer and month of April then it should display previous fiscal year's 6 month i.e from Oct 2017-18 to march 2017-18 and April 2018-19 which will be total 7 months . So when I will take that final measure in slicer, It should filter all the visual on a page.
For your reference please find attached pbix file. PBIX File Link 
thanks in advance. 

 

1 ACCEPTED SOLUTION

Hi Nitin,

 

The pbix I shared with you is working exactly as you're describing it. I only see seven months of data at a time.

 

Below is what you see when Fiscal Year 2018-2019 and Month of April is selected. The data starts from October.

Wilson__2-1680962130322.png

 

Below is what you see when Fiscal Year 2018-2019 and Month of May is selected. The data starts from November.

Wilson__3-1680962156543.png

Please double check that you applied my steps to your file correctly. 😄 For example, the least straight forward step in my solution was using the duplicated table in both the fiscal year and month slicers, but the original table in the visual itself.


----------------------------------
If this post helps, please consider accepting it as the solution to help other members find it quickly. Also, don't forget to hit that thumbs up and subscribe! (Oh, uh, wrong platform?)




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

Proud to be a Super User!





View solution in original post

3 REPLIES 3
Wilson_
Super User
Super User

Hello Nitin,

 

I've downloaded your pbix, added my solution to it and re-uploaded your pbix here.

 

What I've done is the following:

 

  • Added a Month Year (and Month Year Sort) column to match the labels in your visual
  • Duplicated your Date table to use as the date slicer, while using your original Date table in the visual itself
    • This step was important in my particular solution so I could use the field in the slicer, while also preventing it from filtering the Sales table. (Note: I had to re-apply your column sorts in the duplicated table.)
  • Created a Sales Amount measure, and a corresponding Display Sales Amount measure that applied your stated logic.
    • In essence, I used variables to calculate the window for which I would want to show the total sales, then showed the Sales Amount measure if the Month Year fell within that range.

Please let me know if you were looking for something different or please confirm if my solution is what you were looking for! 😄




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

Proud to be a Super User!





Thank you Wilson for your help!  I have download the file that you uploaded and follow the all the steps  that you have mention, in my current data. But the  data is not filtering. When i select fiscal year and month in slicer from Datefilter table It show all the months from Apr to March and Apr(current year) values also get added in previous year Apr. My 50% problem get solved, just there is filter issue should resloved. I request you for futher help i.e. when I will select Fiscal Year 2018-19 in slicer and month of April then it should display previous fiscal year's 6 month i.e from Oct 2017-18 to march 2017-18 and April 2018-19 which will be total 7 months Also when i will select next month i.e May then Nov 2017-18 to Apr-2018-19 shold also display. This should appply all the next moths. Hope you undestand the problem, If not pls let me know. 

Hi Nitin,

 

The pbix I shared with you is working exactly as you're describing it. I only see seven months of data at a time.

 

Below is what you see when Fiscal Year 2018-2019 and Month of April is selected. The data starts from October.

Wilson__2-1680962130322.png

 

Below is what you see when Fiscal Year 2018-2019 and Month of May is selected. The data starts from November.

Wilson__3-1680962156543.png

Please double check that you applied my steps to your file correctly. 😄 For example, the least straight forward step in my solution was using the duplicated table in both the fiscal year and month slicers, but the original table in the visual itself.


----------------------------------
If this post helps, please consider accepting it as the solution to help other members find it quickly. Also, don't forget to hit that thumbs up and subscribe! (Oh, uh, wrong platform?)




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

Proud to be a Super User!





Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.