Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.
Hi all
I have a matrix visual that has
Rows = Customer Names
Columns =Parameter
Values = sales
I want the report user to use the parameter slice to switch between a month view and a year view.
When month view is selected it shows the sales for ALL years. I want it to show current year only.
How can I build this into the parameter? I need it to be filtered to only show data for the current year without the report user having to select the year.
Many thanks
You have switch these two measure like I have done TOPN. You do need separate measures, check the code at the end
Assume you have measure m1 , use that for year
for month
calculate([M1], filter(Table, year(Table[Date]) = year(today()) )
Switch TOPN with Field Parameters: https://amitchandak.medium.com/switch-topn-with-field-parameters-299a0ae3725f
others
Power BI Field Parameters — A Quick way for Dynamic Visuals: https://amitchandak.medium.com/power-bi-field-parameters-a-quick-way-for-dynamic-visuals-fc4095ae9af...
Power BI Field Parameters- Measure Slicer and Axis/Dimension slicer: https://youtu.be/lqF3Wa1FllE
Field Parameters- Conditional Formatting: https://amitchandak.medium.com/field-parameters-conditional-formatting-517aacc23fdf
Hi Amitchandak
Thank you for your help. I have tried your solution but I get this error message
A function 'PLACEHOLDER' has been used in a True/False expression that is used as a table filter expression. This is not allowed.
This is the code i have used - [sell-out Qty] is sales