March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe 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
Hi all,
I have a slicer on my report where the Month can be selected within a year. The slicers is as follow:
I am also using the calculation of the SQLBI page where you can display the last 6 months up until the selected month. See following link: https://www.sqlbi.com/articles/show-previous-6-months-of-data-from-single-slicer-selection/
This is all working fine and perfect but I want to change 1 thing regarding this DAX calculation. Can I change this that the last 6 months will be displayed IF it is in the selected year of the selected month. So that means that if a user has selected April 2021, it will only display the months March, Feb and Jan.
@Anonymous can you share your data in text format which can be copied.
Proud to be a Super User!
Hi @negi007 , thanks for the reply.
My date table looks as follow:
Date | Year | Month Num | Month Name | Month Year | Month Year Order | Current Month |
6/1/2021 | 2021 | 1 | Jan | Jan 2021 | 202101 | Previous Month |
20/6/2021 | 2021 | 6 | Jun | Jun 2021 | 202106 | Previous Month |
15/12/2021 | 2021 | 12 | Dec | Dec 2021 | 202112 | Current Month |
Current Month is calculated as follow:
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
134 | |
91 | |
90 | |
64 | |
58 |
User | Count |
---|---|
201 | |
137 | |
107 | |
70 | |
68 |