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
Syndicate_Admin
Administrator
Administrator

cálculo utilizando el mes actual

Hola a todos

¿Hay alguna manera de calcular una medida simple como, recuento total de algo (presentaciones) pero de una manera que se actualiza dinámicamente con el mes actual de los datos. Por ejemplo, tengo esta medida en una tarjeta visual, y en este momento muestra las presentaciones totales para julio de 2021, cuando los datos lleguen para agosto, la tarjeta se actualizará automáticamente y mostrará el total de agosto, luego eventualmente septiembre cuando lleguen esos datos, etc ......

1 ACCEPTED SOLUTION

Hola Greg, @Greg_Deckler estoy teniendo éxito con esto:

Valor en último año/mes =
CALCULAR(
COUNT( 'JBSIS Testamentte Filings'[Número de caso] ),
FILTER( 'JBSIS Testamentte Filings', 'JBSIS Testamentte Filings'[Report Year Month] = MAX( 'JBSIS Testamentte Filings'[Report Year Month] ) )
)

View solution in original post

5 REPLIES 5
Syndicate_Admin
Administrator
Administrator

@pfarahani Por lo tanto, generalmente, la forma en que se hace esto es crear una columna calculada como la siguiente:

Column IsCurrentMonth = 
  VAR __Today = TODAY()
  VAR __CurrentYear = YEAR(__Today)
  VAR __CurrentMonth = MONTH(__Today)
  VAR __Year = YEAR('Table'[Date])
  VAR __Month = MONTH('Table'[Date])
RETURN
  IF(__Year = __CurrentYear && __Month = __CurrentMonth,1,0)

A continuación, puede filtrar el objeto visual en esta columna = 1

Hola Greg, @Greg_Deckler - mi malo, miré más de cerca los datos en este tablero, es un poco pero diferente. Existe esta tabla de presentaciones, estoy tratando de crear una medida para contar las presentaciones totales basadas en el último / máximo mes-año en este conjunto de datos, que en este momento es diciembre de 2019

pfarahani_0-1627574487292.png

@pfarahani Ok, ¿qué tal este:

Column IsCurrentMonth = 
  VAR __MaxYear = MAX('Table'[Report Year])
  VAR __MaxMonth = MAXX(FILTER('Table',[Report Year] = __MaxYear),[Report Month])
RETURN
  IF([Report Year]=__MaxYear && [Report Month]=__MaxMonth,1,0)

Hola Greg, @Greg_Deckler estoy teniendo éxito con esto:

Valor en último año/mes =
CALCULAR(
COUNT( 'JBSIS Testamentte Filings'[Número de caso] ),
FILTER( 'JBSIS Testamentte Filings', 'JBSIS Testamentte Filings'[Report Year Month] = MAX( 'JBSIS Testamentte Filings'[Report Year Month] ) )
)

@pfarahani Sí, puedo ver cómo funcionaría también!

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.