The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
I need help with filtering by Day, Week, Month, Quarter, and Year.
I created a field parameter called "Period" and attempted to build a line chart using Year and this parameter. However, when users select a date range longer than a year, I don't want the weeks to overlap. Currently, every time I switch between Month and Quarter, I have to use the drill down feature on the chart. Is there a way to achieve this without having to drill down, or is there a simpler solution?
Hello @batman ,
I assume you already have date table, based on that you can create the below measure that dynamically switches between the periods depending on the selected field parameter
Selected Period Value =
SWITCH(TRUE(),
SELECTEDVALUE('Period'[Period]) = "Day", MAX('Date'[Date]),
SELECTEDVALUE('Period'[Period]) = "Week", MAX('Date'[Week]),
SELECTEDVALUE('Period'[Period]) = "Month", MAX('Date'[Month]),
SELECTEDVALUE('Period'[Period]) = "Quarter", MAX('Date'[Quarter]),
SELECTEDVALUE('Period'[Period]) = "Year", MAX('Date'[Year]))
1.Add the Period slicer to your report page using the field parameter you created.
2.In the Line Chart, use the dynamic period value measure as the axis.
If you find this helpful , please mark it as solution which will be helpful for others and Your Kudos/Likes 👍 are much appreciated!
Thank You
Dharmendar S
User | Count |
---|---|
11 | |
9 | |
6 | |
6 | |
5 |
User | Count |
---|---|
22 | |
14 | |
14 | |
9 | |
7 |