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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
archana_c
Helper I
Helper I

Use Filter in DAX and Add a field parameter

I have a table containing loans, loan types and different value fields. I have created a graph visual which shows loans in the x-axis and field parameter (consists of value fields) in the y-axis. I need to add one more slicer for filtering the visual based on the loan type. So instead of adding direct slicer using the loan type field, is it possible to add two measures using filter function and creating a field parameter?
@dax @v-yuta-msft 

3 REPLIES 3
Anonymous
Not applicable

Hi @archana_c ,

In order to better understand your demands and give the right solution, could you please provide some more specific information? such as your desensitized example data and a screenshot of your desired results?

Thanks for your efforts & time in advance.

 

Best regards,
Community Support Team_Binbin Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

hi @Anonymous

archana_c_0-1704261293583.png

Suppose this is the data containing 6 columns. One participant can have more than one loan. I have created a stacked chart with participant in x-axis and field parameter as Y-axis. Field parameter column amount columns. And loans are added as series in the bar chart. So the new requirement is to add one more slicer loan type. The values in the dropdown are Exclude abl, Include abl. When exclude abl is selected we should not consider loans with loa type=abl, where as include abl means we need to consider all the loans. Normal slicer wont work in this case. So there will require some DAX for including and excluding the values. 
Any help is accepted.
Thanks in advance

mohgh
Regular Visitor

Hope this could helps you out:
SelectedLoanTypeMeasure =
SWITCH (
SELECTEDVALUE('YourSlicerTable'[SelectedLoanType]),
"Type1", [LoanType1Measure],
"Type2", [LoanType2Measure],
BLANK()
)

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.