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

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.

Reply
Syndicate_Admin
Administrator
Administrator

Generate a Measure that replaces multiple filters in the "Filter Panel"

JulianVinent_0-1672926186579.png

Hello Community, how are you doing?

The query I want to ask you is the following:

As the image shows, several filters are made from the panel, what I need is to generate a measure that applies those "several filters" and applies them to me.

I generated part of it but I can not make the one that says "Filter 2", I leave the formula, to see if they can help me finish it.

PUENTEOS_e =
WHERE PUENTEOS_e=
FILTER(
FILTER(
Active_Separate_SemCong,
Active_Separate_SemCong[ORG_CODE] = "And"
),
Active_Separate_SemCong[STATE]="Planning"
)
RETURN
COUNTROWS(PUENTEOS_e)

Thank you.

3 REPLIES 3
johnt75
Super User
Super User

Use Performance Analyzer to get the code generated for the visual you need and paste it into DAX Studio. That will show you all the filters being applied and you can copy the code you need.

// DAX Query
DEFINE
VAR __DS0FilterTable =
FILTER(
KEEPFILTERS(VALUES('Active_Separate_Overview'[PALABRA_CLAVE])),
OR(
SEARCH("MIT", 'Active_Separate_Overview'[PALABRA_CLAVE], 1, 0) >= 1,
SEARCH("PUENTEO", 'Active_Separate_Overview'[PALABRA_CLAVE], 1, 0) >= 1
)
)

VAR __DS0FilterTable2 =
TREATAS({"E"}, 'Active_Separate_Overview'[ORG FIRST LETTER])

VAR __DS0FilterTable3 =
TREATAS({"Planificacion"}, 'Active_Separate_Overview'[STATE])

EVALUATE
SUMMARIZECOLUMNS(
__DS0FilterTable,
__DS0FilterTable2,
__DS0FilterTable3,
"CountPALABRA_CLAVE", IGNORE(CALCULATE(COUNTA('Active_Separate_Overview'[PALABRA_CLAVE])))
)

It generates the following code for me but I do not know how to interpret it.

Great, thank you very much!!!

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

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

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.

Top Solution Authors
Top Kudoed Authors