Don't miss your chance to take the Fabric Data Engineer (DP-600) exam for FREE! Find out how by attending the DP-600 session on April 23rd (pacific time), live or on-demand.
Learn moreNext up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now
Hola
Necesito crear un mes anterior dinámico que muestre datos en power bi
Tengo la columna de fecha en la tabla de hechos como "fecha"
También tengo vistas col como "vistas" en la tabla de hechos
Tengo el nombre de tipo col en la tabla Dim
Si selecciono un mes determinado del filtro de fecha, debe mostrar count(views) para el mes anterior del mes seleccionado para Type= News, Reminders y Good to know en mi Power BI
Por ejemplo, si selecciono Sep-2022, debe mostrar el recuento de vistas de agosto a 2022 para Escriba Noticias, Recordatorios y Bueno saberlo.
Debe mostrar el recuento de noticias, recordatorios y bueno saberlo por separado
| Tipo | Recuento de meses anteriores |
| Noticia | 500 |
| Recordatorios | 267 |
| Es bueno saberlo | 900 |
Al igual que la tabla anterior, debe mostrar
Tengo una relación entre la tabla tenue y la tabla de hechos con ID
Por favor ayuda
Gracias de antemano!!!
Hola @Bharathi_99,
Use la siguiente fórmula de DAX para calcular el recuento de vistas del mes anterior:
Prev Month Count =
VAR SelectedMonth = SELECTEDVALUE('Fact table'[date])
VAR PreviousMonth = EDATE(SelectedMonth, -1)
RETURN
CALCULATE(
COUNT('Fact table'[views]),
'Fact table'[date] = PreviousMonth,
'Dim table'[Type] IN {"News", "Reminders", "Good to know"}
)Avíseme si necesita más ayuda.
Hola @Bharathi_99,
Use la siguiente fórmula de DAX para calcular el recuento de vistas del mes anterior:
Prev Month Count =
VAR SelectedMonth = SELECTEDVALUE('Fact table'[date])
VAR PreviousMonth = EDATE(SelectedMonth, -1)
RETURN
CALCULATE(
COUNT('Fact table'[views]),
'Fact table'[date] = PreviousMonth,
'Dim table'[Type] IN {"News", "Reminders", "Good to know"}
)Avíseme si necesita más ayuda.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.