cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Post Prodigy
Post Prodigy

Cómo obtener el valor máximo y su capacidad

Hola a todos

Estoy tratando de obtener en una medida el valor de la capacidad donde su demanda es el máx.

En el ejemplo siguiente, el valor que debe devolver la medida debe ser el de diciembre (857.793) ya que la demanda máxima es en diciembre.

dsfdsdsfd.JPG

¿Cómo puedo obtener el valor de la capacidad que cumple la condición anterior?

Ya tengo la demanda:

Max demand = MAXX(VALUES('Master Table Month'[Month]),[% of sales by line what if rolling])

https://1drv.ms/u/s!ApgeWwGTKtFdhyEaO7IZgUhf2Q-l?e=7mruzM

Gracias a todos.

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support
Community Support

Hola @o59393 ,

Puede crear una medida como se indica a continuación:

_maxCapacity =
VAR _maxMonth =
    CALCULATE (
        MAX ( 'Append1 % of total country demand produced in line'[Month] ),
        FILTER (
            ALL ( 'Append1 % of total country demand produced in line' ),
            [% of sales by line what if rolling] = [Max demand]
        )
    )
RETURN
    CALCULATE (
        [Capacity Measure],
        FILTER (
            ALL ( 'Append1 Balance your lines'[Append1 % of total country demand produced in line.Month] ),
            'Append1 Balance your lines'[Append1 % of total country demand produced in line.Month] = _maxMonth
        )
    )

the max value and its capacity.JPG

Saludos

Rena

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

View solution in original post

4 REPLIES 4
Super User IV
Super User IV

@o59393 , Probar como

Máx.-
var _max -calculate(maxx(values(Table[Month]),[demand UC]),allexcept(Table[Month]))
devolución
calculate([demand UC], filter(Table, Table[Month] ?_max))



Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
Dashboard of My Blogs !! YouTube Channel !! Connect on Linkedin

Proud to be a Super User!

Hola @amitchandak

Nos estamos acercando, supongo que entiendo la lógica.

el var _max es para devolver el mes cuya demanda tiene un máximo. En este caso debe conservar "diciembre"

La devolución debe calcular la capacidad (en este caso se llama "medida de capacidad") cuando el mes coincide con el var max: december para este ejemplo.

Intenté esto:

Max = 
var _max =calculate(maxx(values('Append1 Balance your lines'[Month]),[% of sales by line what if rolling]))
return
calculate([Capacity Measure], filter('Append1 Balance your lines', 'Append1 Balance your lines'[Month] =_max))

Estoy obteniendo un resultado vacío. ¿Puede por favor aconsejar cómo solucionarlo?

¡Gracias!

Community Support
Community Support

Hola @o59393 ,

Puede crear una medida como se indica a continuación:

_maxCapacity =
VAR _maxMonth =
    CALCULATE (
        MAX ( 'Append1 % of total country demand produced in line'[Month] ),
        FILTER (
            ALL ( 'Append1 % of total country demand produced in line' ),
            [% of sales by line what if rolling] = [Max demand]
        )
    )
RETURN
    CALCULATE (
        [Capacity Measure],
        FILTER (
            ALL ( 'Append1 Balance your lines'[Append1 % of total country demand produced in line.Month] ),
            'Append1 Balance your lines'[Append1 % of total country demand produced in line.Month] = _maxMonth
        )
    )

the max value and its capacity.JPG

Saludos

Rena

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

View solution in original post

@yingyinr ¡Impresionante!

Gracias 🙂

Helpful resources

Announcements
November Update

Check it Out!

Click here to read more about the November 2020 Updates!

Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

secondImage

Power Platform October Community Highlights

Check out the top community contributors across all of the communities

secondImage

Create an end-to-end data and analytics solution

Learn how Power BI works with the latest Azure data and analytics innovations at the digital event with Microsoft CEO Satya Nadella.

Top Solution Authors
Top Kudoed Authors