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
PrathSable
Advocate II
Advocate II

Calcular las 4 semanas actuales y las 4 semanas anteriores en función de la fecha

Hola, chicos

¿Necesito calcular los ingresos de las 4 semanas actuales de la fecha seleccionada y las 4 semanas anteriores?

¿Cómo podemos lograrlo? Tengo citas sólo por semanas

WhatsApp Image 2020-07-07 at 16.16.33.jpeg

saludos

Prath Sand

5 REPLIES 5
v-lili6-msft
Community Support
Community Support

hola @PrathSable

En primer lugar, debe crear una relación entre la tabla "Calendario" y la tabla "MIS_Details"

https://radacad.com/do-you-need-a-date-dimension

Ahora use todo el campo de fecha del calendario en el objeto visual.

y luego para la medida [Ventas anteriores de 28 días], eliminar . [Fecha] de la fórmula

Previous 28 days Sales = CALCULATE([Total Sales],DATEADD('Calendar'[reporting_date],-28,DAY))

y aquí está el archivo pbix de muestra, por favor pruébelo.

saludos

Lin

Community Support Team _ Lin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
amitchandak
Super User
Super User

@PrathSable, Revisa mi Blog a la semana, Comprueba la última fórmula de 12 semanas, solo cámbiate de acuerdo a tu necesidad

O ús dichos como filtro en alguna otra fórmula

https://community.powerbi.com/t5/Community-Blog/Week-Is-Not-So-Weak-WTD-Last-WTD-and-This-Week-vs-La...

Hola @amitchandak :

El enlace que compartiste fue lo primero que comprobé. No cumple con lo que quiero ver 😞

Lo que quiero es cuando selecciono una fecha que debería darme datos para las 4 semanas actuales y luego las 4 semanas antes de eso.

Además, debería darme las fechas de las semanas anteriores y Ventas brutas.

Adjuntar el archivo PBIX para su referencia.

https://drive.google.com/file/d/1Ij2Mcp1JsrvKWOIULaEiJzWNQZg5V7tU/view?usp=sharing

saludos

Prath Sand

@PrathSable, la tabla 2 debería ser posible usando mi blog.

Para las tablas 1 y 3 , utilice la segmentación de fecha relativa

https://docs.microsoft.com/en-us/power-bi/visuals/desktop-slicer-filter-date-range

o este enfoque

https://www.youtube.com/watch?v=duMSovyosXE

Voy a tratar de comprobar pbix en algún momento

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.