Microsoft Fabric Community Conference 2025, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount.
Register nowGet certified as a Fabric Data Engineer: Check your eligibility for a 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700. Get started
Dear Team,
My Requirment is
Jan
Feb
Mar
Apr
May
Jun
Jul
Aug
Sep
Oct
I am having one Slicer Quarter and Year
a) If i select Jan in Slicer ----- Visual should show Jan month sales
b) If I slect Feb in Slicer ------ Visual should show Jan and Feb month sales in Graph
Apppreicate the help .
I Can able to send a file if you provide any link.
Thanks
Raman
Solved! Go to Solution.
Hi @Raman3456 ,
I think you want to display the sales for January when you select January in the slicer. When February is selected, the sales for January and February are displayed. When June is selected, the sales for April, May and June are displayed.
Here's my solution.
Sample data
1.Create a calendar table.
Calendar = CALENDAR(MIN('Table'[Date]),MAX('Table'[Date]))
There's no relationship between tables.
2.Create a flag measure.
Flag =
VAR _selmonth =
SELECTEDVALUE ( 'Calendar'[Date].[MonthNo] )
VAR _minmonth =
SWITCH (
_selmonth,
1, 1,
2, 1,
3, 1,
4, 4,
5, 4,
6, 4,
7, 7,
8, 7,
9, 7,
10, 10,
11, 10,
12, 10
)
VAR _month =
MONTH ( MAX ( 'Table'[Date] ) )
RETURN
IF (
_month >= _minmonth
&& _month <= _selmonth
&& YEAR ( MAX ( 'Table'[Date] ) ) = SELECTEDVALUE ( 'Calendar'[Date].[Year] ),
1
)
Put this measure into visual level filters. Then set show items when the value is 1.
3.Put the year and month hierarchy in the calendar table into the slicer, and the results is as follows.
Best Regards,
Stephen Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Raman3456 ,
I think you want to display the sales for January when you select January in the slicer. When February is selected, the sales for January and February are displayed. When June is selected, the sales for April, May and June are displayed.
Here's my solution.
Sample data
1.Create a calendar table.
Calendar = CALENDAR(MIN('Table'[Date]),MAX('Table'[Date]))
There's no relationship between tables.
2.Create a flag measure.
Flag =
VAR _selmonth =
SELECTEDVALUE ( 'Calendar'[Date].[MonthNo] )
VAR _minmonth =
SWITCH (
_selmonth,
1, 1,
2, 1,
3, 1,
4, 4,
5, 4,
6, 4,
7, 7,
8, 7,
9, 7,
10, 10,
11, 10,
12, 10
)
VAR _month =
MONTH ( MAX ( 'Table'[Date] ) )
RETURN
IF (
_month >= _minmonth
&& _month <= _selmonth
&& YEAR ( MAX ( 'Table'[Date] ) ) = SELECTEDVALUE ( 'Calendar'[Date].[Year] ),
1
)
Put this measure into visual level filters. Then set show items when the value is 1.
3.Put the year and month hierarchy in the calendar table into the slicer, and the results is as follows.
Best Regards,
Stephen Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@Raman3456 if you have multiple years data, selecting a month doesn't tell you a quarter of which years you are looking at? Isn't it?
Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!
Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo
If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤
Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.
@Raman3456 When you are working with dates, it is a best practice to add a date dimension in your model, you can add one by following my post here, once it is done then you can add the following measure to get QTD sales
QTD Sales = CALCULATE ( SUM ( Table[Sales] ), DATESQTD ( 'Date Table'[Date] ) )
✨ Follow us on LinkedIn
Learn about conditional formatting at Microsoft Reactor
My latest blog post The Power of Using Calculation Groups with Inactive Relationships (Part 1) (perytus.com) I would ❤ Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos to whoever helped to solve your problem. It is a token of appreciation!
⚡ Visit us at https://perytus.com, your one-stop-shop for Power BI-related projects/training/consultancy.⚡
Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!
Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo
If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤
Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.
Hi Parry,
Thanks for the Prompt reply .
Unable to see January and Febraury , I have selected the February data.
Thanks & Regards,
Raman
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.
If you love stickers, then you will definitely want to check out our Community Sticker Challenge!
User | Count |
---|---|
146 | |
72 | |
63 | |
52 | |
51 |
User | Count |
---|---|
208 | |
91 | |
62 | |
59 | |
56 |