Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Shape the future of the Fabric Community! Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions. Take survey.

Reply
Rac3rss
Helper I
Helper I

Marcar valor máximo de una matriz

Hola, Me surge una duda.

Tengo la siguiente tabla:

Rac3rss_0-1696488803941.png

 

con las medidas:

%LotX = CALCULATE(MAX(Tabla), FILTER(Tabla, Columna="X"))
MaxLotX = if ([%LotX] = calculate(Maxx(values(Tabla),[%LotX]), REMOVEFILTERS(Tabla)), "Orangered""Blank")
 
La cuestión es que se tiene que resaltar el % más alto (19,98%), que es la suma de varios importes. 
Creo que ahora solo me esta resaltando quien tiene el importe más alto. Como deberia poner en la expresión que me coja el Máximo del Sumatorio??
 
Gracias.
1 ACCEPTED SOLUTION
v-yangliu-msft
Community Support
Community Support

Hi  @Rac3rss ,

 

Are you referring to the fact that the maximum in LO1 should be 120,000, but the red label is on 110,000?

vyangliumsft_0-1696931144929.png

 

You need to change Max() to the Sum() function, otherwise the maximum data of the current grouping will be displayed, not the added data.

%Lo1 = CALCULATE(SUM(Principal[Amount]), FILTER(ALL(Principal), 'Principal'[Prov]=MAX('Principal'[Prov])&&Principal[Lo]="LO 1"))

vyangliumsft_1-1696931144930.png

 

Best Regards,

Liu Yang

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

12 REPLIES 12
v-yangliu-msft
Community Support
Community Support

Hi  @Rac3rss ,

 

Are you referring to the fact that the maximum in LO1 should be 120,000, but the red label is on 110,000?

vyangliumsft_0-1696931144929.png

 

You need to change Max() to the Sum() function, otherwise the maximum data of the current grouping will be displayed, not the added data.

%Lo1 = CALCULATE(SUM(Principal[Amount]), FILTER(ALL(Principal), 'Principal'[Prov]=MAX('Principal'[Prov])&&Principal[Lo]="LO 1"))

vyangliumsft_1-1696931144930.png

 

Best Regards,

Liu Yang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

v-yangliu-msft
Community Support
Community Support

Hi  @Rac3rss ,

 

 

You can try the following dax:

MaxLotX =
IF(
    [%LotX]=
MAXX(
    ALLSELECTED('Table'),[%LotX]), "Orangered", "Blank"
)

vyangliumsft_0-1696838105559.png

The link to the file you posted shows that it has been deleted after clicking on it, and the DAX on it is written based on the sample data you gave.

 

Best Regards,

Liu Yang

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

Lo puedes probar ahora?? 

 

https://file.io/dqEM4kpkju56

 

He probado tu solución pero no funciona.

 

Gracias.

 

rubayatyasmin
Super User
Super User

Aggregate Amounts by Prov

TotalAmountByProv = SUM('YourTableName'[Amount])

 

Use the measure in the visual. Then

  1. Conditional formatting > Background color.
  2. Select Color by rules.

 

Provide a sample dataset of the pbix file if possible. I will try to solve your problem.

rubayatyasmin_0-1689517080227.png

 


Did I answer your question? Mark my post as a solution!super-user-logo

Proud to be a Super User!


Como te puedo adjuntar el archivo .pbix??

Saludos.

from your browser go to file.io and upload the pbix there then paste the link here.

 

rubayatyasmin_0-1689517080227.png


Did I answer your question? Mark my post as a solution!super-user-logo

Proud to be a Super User!


Aqui tienes el archivo:

https://file.io/EmhPwhcCdoEL

 

Hola, Lo has podido revisar?

Gracias.

can you please upload the file again? it's been deleted


Did I answer your question? Mark my post as a solution!super-user-logo

Proud to be a Super User!


rubayatyasmin
Super User
Super User

Hi @Rac3rss 

 

First, ensure that you have a column or measure that sums the amounts you are interested in. Let's call this column or measure TotalSum. Then review the first dax

 

%LotX = CALCULATE(SUM(Table[TotalSum]), FILTER(Table, Table[Column]="X"))

 

This formula will sum up the TotalSum column (or measure) for rows where [column]="X".

 

MaxLotX = IF([%LotX] = CALCULATE(MAXX(VALUES(Table[TotalSum]), [%LotX]), REMOVEFILTERS(Table)), "Orangered", "Blank")

 

rubayatyasmin_0-1689517080227.png

 

 


Did I answer your question? Mark my post as a solution!super-user-logo

Proud to be a Super User!


Hola, no me funciona. Quiza me he explicado mal.

 

Tengo la siguiente tabla matriz:

ProvImporte
A155.000
B200.000
C119.000

 

Ahora mismo me resalta los 155k ya que es el valor máximo de la tabla principal, pero necesito resaltar los 200k ya que es la suma de 3 valores de la columna. Es decir, en la tabla principal tengo lo siguiente:

 

ProvImporte
A155.000
B50.000
B50.000
B100.000
C119.000

 

Como ves, el importe más alto de la columna Importe es 155k pero el que tiene la suma de los importes más altos es el B con un total de 200k.

 

Como lo puedo solucionar para marcar los 200K en vez de los 155k?

 

Muchas gracias.

Helpful resources

Announcements
November Carousel

Fabric Community Update - November 2024

Find out what's new and trending in the Fabric Community.

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

Check out the November 2024 Power BI update to learn about new features.

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.