The ultimate Microsoft Fabric, Power BI, Azure AI, and SQL learning event: Join us in Stockholm, September 24-27, 2024.
Save €200 with code MSCUST on top of early bird pricing!
Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
Tengo una mesa que se ve así:
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
@Marshy , consulte si esto puede ayudar a
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))
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] )
)
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Check out the August 2024 Power BI update to learn about new features.