Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
osindhuw1
New Member

Dynamic Multi-Column Filter based on one parameter

Hi All,

 

I am looking for assistance to make a dynamic filter in my visual. My data is look like this below picture, basically consists of item code, month, year, and data checker for each departure and arrival, and lastly the quantity.

osindhuw1_6-1690431648152.png

 

I am creating 1 parameter called "Parameter month", consisted of Departure (represent month departed column) and Arrival (represent month arrived column). I use it as slicer, so whenever i select Departure, my graph will visualize total quantity based on month departed column, and so do with Arrival. The measure to summarized the total quantity based on the selected slicer is done and the visual works perfectly.

 

The problem now is, i want to filter only for item departed/arrived (based on slicer) in 2023 and only OK data. So whenever i choose "Departure" in  slicer, my visual will only show all data with Year departed = 2023 and Departure OK = 1, which is the sum of quantity is 20.

osindhuw1_7-1690431697857.png

 

Same goes when i choose Arrival slicer, my visual will only show data with Year arrived = 2023 and Arrival OK = 1, with the sum of quantity of 16 (regardless whatever the departure status is)

osindhuw1_8-1690431729836.png

 

I tried to create a new parameter year, and put it in the filter, but it seems the filter only show the column name instead of the value of the column, makes filtering not possible. Any advise to create this dynamic filter, without adding any new slicer in the visual page?

osindhuw1_5-1690431484680.png

 

1 REPLY 1
amitchandak
Super User
Super User

@osindhuw1 , Join both dates with the same column. There will be one inactive join. You can activate that using userelationship in the measures.

 

Now you can create a measure and switch them using field parameters of old measure switch method

 

Userelationship

Power BI: HR Analytics - Employees as on Date : https://youtu.be/e6Y-l_JtCq4
https://community.powerbi.com/t5/Community-Blog/HR-Analytics-Active-Employee-Hire-and-Termination-tr...

 

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
Switch TOPN with Field Parameters: https://amitchandak.medium.com/switch-topn-with-field-parameters-299a0ae3725f
Field Parameters- Conditional Formatting
: https://amitchandak.medium.com/field-parameters-conditional-formatting-517aacc23fdf

 

 

Measure Slicer old Way: https://youtu.be/b9352Vxuj-M

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.