Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register 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! Prices go up Feb. 11th.
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
144 | |
74 | |
63 | |
51 | |
47 |
User | Count |
---|---|
211 | |
85 | |
64 | |
59 | |
56 |