Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
Medida actual para calcular el inventario total mensual
Gracias V-Xinruzhu-msft ..... resultados a continuación. El campo [Mes y año] forma parte de la tabla FECHA relacionada con el campo BS_Data a través de [Fecha]. Hay un problema con el contexto que probablemente no he proporcionado:
Mes y Año | Mi Inv Total | Su total de Inv | Promedio de inventario |
feb-22 | $ 1.792.922,31 | $ 1.792.922,31 | $ 1.792.922,31 |
mar-22 | $ 2.014.764,71 | $ 2.014.764,71 | $ 1.792.922,31 |
abr-22 | $ 2.056.898,05 | $ 2.056.898,05 | $ 1.792.922,31 |
Mayo-22 | $ 1.970.625,12 | $ 1.970.625,12 | $ 1.792.922,31 |
jun-22 | $ 1.991.253,61 | $ 1.991.253,61 | $ 1.792.922,31 |
jul-22 | $ 1.953.782,03 | $ 1.953.782,03 | $ 1.792.922,31 |
ago-22 | $ 2.191.453,59 | $ 2.191.453,59 | $ 1.792.922,31 |
sep-22 | $ 2.310.363,95 | $ 2.310.363,95 | $ 1.792.922,31 |
oct-22 | $ 2.658.989,56 | $ 2.658.989,56 | $ 1.792.922,31 |
nov-22 | $ 2.788.789,25 | $ 2.788.789,25 | $ 1.792.922,31 |
dic-22 | $ 2.765.791,27 | $ 2.765.791,27 | $ 1.792.922,31 |
ene-23 | $ 2.924.794,48 | $ 2.924.794,48 | $ 1.792.922,31 |
feb-23 | $ 3.036.040,05 | $ 3.036.040,05 | $ 1.792.922,31 |
mar-23 | $ 3.108.012,60 | $ 3.108.012,60 | $ 1.792.922,31 |
abr-23 | $ 2.905.068,30 | $ 2.905.068,30 | $ 1.792.922,31 |
Mayo-23 | $ 2.752.525,03 | $ 2.752.525,03 | $ 1.792.922,31 |
jun-23 | $ 2.708.054,29 | $ 2.708.054,29 | $ 1.792.922,31 |
hola
Inventario promedio de los últimos 6 meses =
VAR CurrentMonth = MAX('BS_Data'[Mes]) -- Suponiendo que 'Mes' es la columna que representa los meses
VAR StartMonth = SI(MAX('BS_Data'[Mes]) - 5 <= MIN('BS_Data'[Mes]), MIN('BS_Data'[Mes]), MAX('BS_Data'[Mes]) - 5)
VAR EndMonth = MAX('BS_Data'[Mes])
VAR NumMonths = COUNTROWS(FILTER('BS_Data', 'BS_Data'[Month] >= StartMonth && 'BS_Data'[Month] <= EndMonth))
DEVOLUCIÓN
SI(NumMeses < 6,
AVERAGEX(FILTER('BS_Data', 'BS_Data'[Month] = CurrentMonth), 'BS_Data'[Balance]),
PROMEDIOX(
FILTRO(
«BS_Data»,
'BS_Data'[Mes] >= CurrentMonth - 5 && 'BS_Data'[Mes] <= CurrentMonth
),
'BS_Data'[Equilibrio]
)
)
Si no ve su modelo, deberá ajustar los nombres de columna ('Mes', 'BS_Data', 'Saldo') en la medida para que coincidan con los nombres de columna en su modelo. Además, asegúrese de que la columna 'Mes' tenga el formato de fecha o contenga valores de fecha para que funcione.
Subcategoría | Fecha | Cuenta | Equilibrar | Total | Promedio |
Inventario | 2/28/2022 | 1000 | $ 173.755,36 | ||
Inventario | 2/28/2022 | 2000 | $ 2.396.491,26 | ||
Reservas de inventario | 2/28/2022 | 3000 | ($727,324.31) | $ 1.842.922,31 | $ 1.842.922,31 |
Inventario | 3/31/2022 | 4000 | ($16,139.78) | ||
Inventario | 3/31/2022 | 1000 | $ 127.339,02 | ||
Inventario | 3/31/2022 | 5000 | $ 393.89 | ||
Inventario | 3/31/2022 | 2000 | $ 2.464.234,37 | ||
Reservas de inventario | 3/31/2022 | 3000 | ($727,324.32) | $ 1.848.503,18 | $ 1.845.712,75 |
Inventario | 4/30/2022 | 4000 | $ 3.984,03 | ||
Inventario | 4/30/2022 | 1000 | $ 45.977,16 | ||
Inventario | 4/30/2022 | 5000 | $ 5.752,73 | ||
Inventario | 4/30/2022 | 2000 | $ 2.612.699,21 | ||
Reservas de inventario | 4/30/2022 | 3000 | ($727,324.32) | $ 1.941.088,81 | $ 1.877.504,77 |
Inventario | 5/31/2022 | 1000 | $ 23.127,14 | ||
Inventario | 5/31/2022 | 2000 | $ 2.543.720,99 | ||
Reservas de inventario | 5/31/2022 | 3000 | ($724,651.48) | $ 1.842.196,65 | $ 1.868.677,74 |
Inventario | 6/30/2022 | 1000 | $ 58.808,53 | ||
Inventario | 6/30/2022 | 2000 | $ 2.542.381,53 | ||
Reservas de inventario | 6/30/2022 | 3000 | ($721,131.09) | $ 1.880.058,97 | $ 1.870.953,98 |
Inventario | 7/31/2022 | 1000 | $ 80.969,48 | ||
Inventario | 7/31/2022 | 2000 | $ 2.471.854,94 | ||
Reservas de inventario | 7/31/2022 | 3000 | ($730,192.13) | $ 1.822.632,29 | $ 1.862.900,37 |
Inventario | 8/31/2022 | 1000 | $ 120.011,34 | ||
Inventario | 8/31/2022 | 2000 | $ 2.655.650,40 | ||
Reservas de inventario | 8/31/2022 | 3000 | ($806,739.13) | $ 1.968.922,61 | $ 1.883.900,42 |
Inventario | 9/30/2022 | 1000 | $ 31.772,13 | ||
Inventario | 9/30/2022 | 2000 | $ 2.769.393,21 | ||
Reservas de inventario | 9/30/2022 | 3000 | ($743,358.78) | $ 2.057.806,56 | $ 1.918.784,32 |
Inventario | 10/31/2022 | 1000 | $ 59.120,05 | ||
Inventario | 10/31/2022 | 2000 | $ 3.064.282,38 | ||
Reservas de inventario | 10/31/2022 | 3000 | ($744,559.05) | $ 2.378.843,38 | $ 1.991.743,41 |
Inventario | 11/30/2022 | 1000 | $ 62.197,02 | ||
Inventario | 11/30/2022 | 2000 | $ 3.164.264,98 | ||
Reservas de inventario | 11/30/2022 | 3000 | ($793,079.90) | $ 2.433.382,10 | $ 2.090.274,32 |
Inventario | 12/31/2022 | 1000 | $ 74.531,77 | ||
Inventario | 12/31/2022 | 2000 | $ 3.143.180,69 | ||
Reservas de inventario | 12/31/2022 | 3000 | ($792,709.63) | $ 2.425.002,83 | $ 2.181.098,30 |
Inventario | 1/31/2023 | 1000 | $ 49.807,43 | ||
Inventario | 1/31/2023 | 2000 | $ 3.317.395,47 | ||
Reservas de inventario | 1/31/2023 | 3000 | ($794,295.07) | $ 2.572.907,83 | $ 2.306.144,22 |
Inventario | 2/28/2023 | 4000 | ($1.53) | ||
Inventario | 2/28/2023 | 1000 | $ 19.876,13 | ||
Inventario | 2/28/2023 | 2000 | $ 3.459.801,51 | ||
Reservas de inventario | 2/28/2023 | 3000 | ($798,473.36) | $ 2.681.202,75 | $ 2.424.857,58 |
Inventario | 3/31/2023 | 1000 | $ 37.662,19 | ||
Inventario | 3/31/2023 | 2000 | $ 3.472.822,01 | ||
Reservas de inventario | 3/31/2023 | 3000 | ($767,511.49) | $ 2.742.972,71 | $ 2.571.093,64 |
Inventario | 4/30/2023 | 1000 | $ 14.343,54 | ||
Inventario | 4/30/2023 | 2000 | $ 3.303.697,47 | ||
Reservas de inventario | 4/30/2023 | 3000 | ($757,092.97) | $ 2.560.948,04 | $ 2.569.402,71 |
Inventario | 5/31/2023 | 1000 | $ 15.891,52 | ||
Inventario | 5/31/2023 | 2000 | $ 3.202.456,96 | ||
Reservas de inventario | 5/31/2023 | 3000 | ($762,636.58) | $ 2.455.711,90 | $ 2.573.124,34 |
Inventario | 6/30/2023 | 1000 | $ 35.325.97 | ||
Inventario | 6/30/2023 | 2000 | $ 3.131.172,31 | ||
Reservas de inventario | 6/30/2023 | 3000 | ($790,504.02) | $ 2.375.994,26 | $ 2.564.956,25 |