Don't miss your chance to take the Fabric Data Engineer (DP-700) exam on us!
Learn moreNext up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now
Hola expertos,
Necesito usar una condición de filtro en la que quiero mostrar los datos de la siguiente manera:
Product.ProductName ="Apple"
o
Geography.Region = "US".
Necesito crear un filtro para lo mismo en Power Bi, pero no puedo crear un filtro con "O".
¿Podría sugerirme cómo puedo superar este desafío?
Gracias y saludos,
Tushar Gaurav
Alta @तुषारगौरव
La solución @DataInsights ofrece es excelente y también puede considerar la siguiente solución.
Si desea controlar el filtro, puede crear una medida.
Measure =
IF (
OR (
SELECTEDVALUE ( 'Product'[ProductName] ) = "Apple",
SELECTEDVALUE ( 'Geography'[Region] ) = "US"
),
1,
0
)
A continuación, coloque la medida en el filtro visual y establezca la condición de que la medida sea igual a 1.
¡Saludos!
Yolo Zhu
Si esta publicación ayuda, considere Aceptarlo como la solución para ayudar a los otros miembros a encontrarlo más rápidamente.
Pruebe esta medida:
OR Filter =
VAR vFilterTable =
FILTER (
CROSSJOIN ( ALL ( 'Product'[ProductName] ), ALL ( Geography[Region] ) ),
'Product'[ProductName] = "Apple"
|| Geography[Region] = "US"
)
VAR vResult =
CALCULATE ( SUM ( FactTable[Amount] ), KEEPFILTERS ( vFilterTable ) )
RETURN
vResult
https://www.sqlbi.com/articles/specifying-multiple-filter-conditions-in-calculate/
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.