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
hstgeorge
Helper III
Helper III

Necesita ayuda con QTD - Calendario personalizado

He creado el siguiente calc:

QTD CY ?
CALCULATE(SUM(NFSOP_SecVol_TD[UCs]),
FILTRO (
ALL(NFSOP_SecVol_TD),
NFSOP_SecVol_TD[445 Quarter Number] - MAX(NFSOP_SecVol_TD[445 Quarter Number])
&& NFSOP_SecVol_TD[Semana ] <-MAX(NFSOP_SecVol_TD[Semana])
)
)
Esto me da el valor QTD, pero rellena el mismo valor en cada línea para la zona geográfica de vísperas - creo que necesito hacer el calc anterior como una columna para que se calcule correctamente en todo el archivo - ¿cómo puedo hacer esto?
4 REPLIES 4
v-jayw-msft
Community Support
Community Support

Hola @hstgeorge ,

Revisa el formual y mira si es lo que quieres.

Si no es así, por favor comparta algunos datos de muestra y el resultado esperado para nosotros.

QTD CY = 
CALCULATE(SUM('Table'[value]),
FILTER(
ALLEXCEPT('Table','Table'[geographical zone]),
'Table'[quarter] = MAX('Table'[quarter])
&& 'Table'[week] <= MAX('Table'[week])
)
)

1.PNG

Saludos

Jay

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

@hstgeorge , En un problema similar esto lo que he hecho

Añadida nueva columna a la tabla de fechas

Start of Year = STARTOFYEAR(Dates[Date],"1/31") // Change year end date
Add Qtr = QUOTIENT(DATEDIFF(Dates[Start of Year], Dates[Date],MONTH),3)*3
Strat of Qtr = date(year(Dates[Start of Year]), month(Dates[Start of Year])+Dates[Add Qtr],1)
Qtr No = "Q"& QUOTIENT(DATEDIFF(Dates[Start of Year], Dates[Date],MONTH),3)+1
Week # = as per your calc

Se crearon medidas como

LQ New = CALCULATE(SUM(NFSOP_SecVol_TD[UCs], FILTER(ALL(Dates), Dates[Qtr Rank] =max(Dates[Qtr Rank])-1
  && Dates[Week #] = Max(Dates[Week #])))
  
LQ Running Total New =
 CALCULATE(SUM(NFSOP_SecVol_TD[UCs], FILTER(ALL(Dates), Dates[Qtr Rank] =max(Dates[Qtr Rank])-1 
 && Dates[Week #] <= Max(Dates[Week #])))
Greg_Deckler
Super User
Super User

Por favor, consulte este post sobre cómo obtener su pregunta respondida rápidamente: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490

Las partes más importantes son:
1. Muestra datos como texto, utilice la herramienta de tabla en la barra de edición
2. Salida esperada a partir de datos de muestra
3. Explicación en palabras de cómo obtener de 1. a 2.


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...
jdbuchanan71
Super User
Super User

@hstgeorge

Intente aplicar el ALL solo a la semana y al trimestre en lugar de a toda la mesa.

QTD CY =
CALCULATE (
    SUM ( NFSOP_SecVol_TD[UCs] ),
    FILTER (
        ALL ( NFSOP_SecVol_TD[445 Quarter Number], NFSOP_SecVol_TD[Week #] ),
        NFSOP_SecVol_TD[445 Quarter Number] = MAX ( NFSOP_SecVol_TD[445 Quarter Number] )
        && NFSOP_SecVol_TD[Week #] <= MAX ( NFSOP_SecVol_TD[Week #] )
    )
)

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.