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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
Marshy
Frequent Visitor

Filtro de días atrás (1,7,28)

Tengo una mesa que se ve así:

Marshy_0-1593679903685.png

Quiero ser capaz de hacer un filtro personalizado o segmentación de datos que dice si 1 a continuación, calcular la columna ship_visit_1d
si 7 luego calcular la columna ship_visit_7d
si 28 luego calcular la columna ship_visit_28d

No puedo por mi vida resolver esto, ¿alguien puede ayudar?

Tia

2 REPLIES 2
amitchandak
Super User
Super User

@Marshy , consulte si esto puede ayudar a

https://community.powerbi.com/t5/Desktop/Slicer-MTD-QTD-YTD-to-filter-dates-using-the-slicer/td-p/50...

Rolling 7 day = CALCULATE(sum(Sales[Sales Amount]),DATESINPERIOD(Table,today()-7,7,day))
Rolling 7 to 14 day = CALCULATE(sum(Sales[Sales Amount]),DATESINPERIOD(Table,today()-14,7,day))

7 Days behind Sales = CALCULATE(SUM(Sales[Sales Amount]),dateadd('Date'[Date],-7,DAY))
14 Days behind Sales = CALCULATE(SUM(Sales[Sales Amount]),dateadd('Date'[Date],-7,DAY))
21 Days behind Sales = CALCULATE(SUM(Sales[Sales Amount]),dateadd('Date'[Date],-7,DAY))
Mariusz
Community Champion
Community Champion

Hola @Marshy

1. Cree una tabla con las filas de árbol 1, 7 y 28.

2 Crear medida:

result = 
SWITCH(
    SELECTEDVALUE( SelectionTable[selection] ),
    1, SUM( table[ship_visit_1d] ),
    7, SUM( table[ship_visit_7d] ),
    28, SUM( table[ship_visit_28d] )
)

Saludos
Mariusz

Si este post ayuda, entonces considere aceptarlo como la solución.

Por favor, siéntase libre de conectarse conmigo.
Linkedin

Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

AugPowerBI_Carousel

Power BI Monthly Update - August 2024

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

August Carousel

Fabric Community Update - August 2024

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

Top Solution Authors
Top Kudoed Authors