Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
I have a custom period filter for "Last 5 Quarters", "Last 5 Months", and "Last 5 Weeks". And a Parameter that dynamically filters the x axis based on 3 date fields, [Fiscal Year Quarter], [Fiscal Year Month], [Fiscal Year Week]
I am looking to have the functionality where,
- If a user selects "Last 5 Quarters", then the Parameter is default to "Fiscal Year Quarter"
- If a user selects "Last 5 Months" , then Parameter is default to "Fiscal Year Month"... etc.
Therefore I can remove the "Parameter" slicer from the report. Is there a way for this?
Parameter = {
("Fiscal Year Quarter", NAMEOF('Date'[Fiscal Year Quarter]), 0),
("Fiscal Year Month", NAMEOF('Date'[Fiscal Year Month]), 1),
("Fiscal Year Week", NAMEOF('Date'[Fiscal Year Week]), 2)
}
Period Filter =
VAR _selectedperiod = SELECTEDVALUE('Last 5 Custom Period'[Period-Order])
VAR _last5qtr =
IF(
CALCULATE(
MAX('Date'[Date]),
'Date'[Fiscal Year Quarter (Offset)] >= -4 && 'Date'[Fiscal Year Quarter (Offset)] <= 0
),
1,
0
)
VAR _last5months =
IF(
CALCULATE(
MAX('Date'[Date]),
'Date'[Fiscal Year Month (Offset)] >= -4 && 'Date'[Fiscal Year Month (Offset)] <= 0
),
1,
0
)
VAR _last5wks =
IF(
CALCULATE(
MAX('Date'[Date]),
'Date'[Fiscal Year Week (Offset)] >= -4 && 'Date'[Fiscal Year Week (Offset)] <= 0
),
1,
0
)
RETURN
INT(SWITCH(
_selectedperiod, 1, _last5qtr,
2, _last5months,
3, _last5wks
))
Solved! Go to Solution.
@dogt1225 , you can change the measure based on selected axis value.
Just remember for trends using a date/period, date/period should come from an independent table
Changing measures based on the axis with Field Parameters in Power BI. Dynamic measures based on the axis/Dimension: https://youtu.be/7ikRAelDph0
Switch TOPN with Field Parameters: https://amitchandak.medium.com/switch-topn-with-field-parameters-299a0ae3725f
Power BI Abstract Thesis: Need of an Independent Date Table:https://www.youtube.com/watch?v=44fGGmg9fHI
@dogt1225 , you can change the measure based on selected axis value.
Just remember for trends using a date/period, date/period should come from an independent table
Changing measures based on the axis with Field Parameters in Power BI. Dynamic measures based on the axis/Dimension: https://youtu.be/7ikRAelDph0
Switch TOPN with Field Parameters: https://amitchandak.medium.com/switch-topn-with-field-parameters-299a0ae3725f
Power BI Abstract Thesis: Need of an Independent Date Table:https://www.youtube.com/watch?v=44fGGmg9fHI
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
57 | |
55 | |
55 | |
37 | |
30 |
User | Count |
---|---|
78 | |
64 | |
45 | |
44 | |
40 |