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

Get certified in Microsoft Fabric—for free! For a limited time, the Microsoft Fabric Community team will be offering free DP-600 exam vouchers. Prepare now

Reply
Syndicate_Admin
Administrator
Administrator

Total sales DAX filtered by more than one product ID

¡Buenos días!

antes que nada quería agradecer toda la ayuda brindada por está comunidad! ‌ 

Ahora les consulto lo siguiente, necesito filtrar el total (mi usuario no interactua con el informe) por solo tres productos. Alguien me puede ayudar con la fórmula DAX (no lo quiero hacer por el panel de filtros)

TotalFiltrado= Calcular (TotalVentas, Producto = 1 && Producto = 2 && Producto = 3)

usó el filtro, pero solo puedo poner un producto.

Muchas gracias por leer!

buena semana,

Saludos,

Ana
1 REPLY 1
v-cgao-msft
Community Support
Community Support

Hi @Syndicate_Admin ,

 

//Producto = 1 && Producto = 2 && Producto = 3

"&&" indicates that and, the record for the Product ID will not be equal to 1 and 2 and 3. The logic should be that the Product ID is equal to 1 or 2 or 3.

 

Please try this measure:

TotalFiltrado =
CALCULATE (
    [TotalVentas],
    FILTER ( 'Table', 'Table'[Producto] IN { 1, 2, 3 } )
)

 

Best Regards,
Gao

Community Support Team

 

If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

How to get your questions answered quickly -- How to provide sample data

Helpful resources

Announcements
OCT PBI Update Carousel

Power BI Monthly Update - October 2024

Check out the October 2024 Power BI update to learn about new features.

September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

October NL Carousel

Fabric Community Update - October 2024

Find out what's new and trending in the Fabric Community.