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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Hodgey87
Regular Visitor

Agrupar por semana ... Novato

Hola, chicos

En primer lugar, siento ser un dolor ... Me han pedido que produzca un tablero inicialmente para ventas por día en comparación con el año pasado, que está funcionando bien. ¿Puedo preguntar cuál sería la mejor manera de agrupar esta tabla por número de semana? Es decir, la semana 1 y las ventas totales, la semana 2 y las ventas totales.

¿Podría usar algún tipo de declaración if?

F36F869B-8118-4982-9E69-3614EBC03F5A.jpeg

2 REPLIES 2
v-xicai
Community Support
Community Support

Hola @Hodgey87 ,

Puede crear una medida como DAX a continuación.

Week_Sum=CALCULATE(SUM(Table1[Sales]),FILTER(ALLSELECTED(Table1), YEAR(Table1[date]) =YEAR(MAX(Table1[date]))&&WEEKNUM(Table1[date]) =WEEKNUM(MAX(Table1[date]))))

Saludos

Amy

Equipo de Apoyo Comunitario _ Amy

Si este post ayuda,entonces por favor considere Aceptarlo como la solución para ayudar a los otros miembros a encontrarlo más rápidamente.

az38
Community Champion
Community Champion

@Hodgey87

ventas que desea resumir son medidas o columnas?

si las columnas - sólo se puede agregar en la configuración de campos visuales

si las medidas se puede probar una nueva medida como

Measure = CALCULATE(SUMX(Table, Table[Sales Variance]), ALLEXCEPT(Table, Table[Week Number]))

do not hesitate to give a kudo to useful posts and mark solutions as solution
LinkedIn

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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