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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Syndicate_Admin
Administrator
Administrator

CHALLENGE with INDEX measure

Good afternoon, everyone.

Attached screenshot with the problem I have with CASE No. 3.

Thanks a lot!

WhatsApp Image 2024-02-13 at 19.56.05.jpeg

2 REPLIES 2
Anonymous
Not applicable

Hi  @Syndicate_Admin ,

 

What you show in your picture is Spanish language, not English, I can only help you according to my understanding, if the result is not in line with your expected result, you can explain the steps in English and we can help you higher!

Here are the steps you can follow:

1. Create calculated column.

Test01 =
var _scolumn=
SELECTCOLUMNS(FILTER(ALL('Table'),'Table'[EQUIPO]=EARLIER('Table'[EQUIPO])),
"test",[PROCESO])
return
IF(
    'Table'[VALOR] in _scolumn,1,0)
Test02 =
var _min=
MINX(
    FILTER(ALL('Table'),
    'Table'[EQUIPO]=EARLIER('Table'[EQUIPO])&&'Table'[Test01]=0),
    [PROCESO])
return
MAXX(
    FILTER(ALL('Table'),
    'Table'[EQUIPO]=EARLIER('Table'[EQUIPO])&&'Table'[Test01]=0&&'Table'[PROCESO]=_min),[VALOR])

vyangliumsft_0-1707880413811.png

2. Create calculated table.

Table 2 =
VAR _table=
FILTER(
    'Table',[Test01]=0&&[Test02]=[VALOR])
return
SUMMARIZE(
    _table,[EQUIPO],[PROCESO],[COLOR],[VALOR])

3. Result:

vyangliumsft_1-1707880413812.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

I thought it was correct but no, if 1.RED is in all the rows of a TEAM then I have to select the highest process and then if there is a tie in the number, choose the one with the highest value (column).

The other case is that if not all rows have 1.RED, then I have to stay with the minor process and if there is a tie between the number of the process, choose from these rows, the one with the highest value (column) BUT I have to eliminate from the first row (sorted by process and later by value) to the row with the most advanced 1.RED. This last part can be seen on Team C in the opening image.

In english:

I thougt it was correcto, but no.

If 1.ROJO is present in every row of a TEAM, then I have to select the highest process and if there is a tie in the number, choose the one with the highest value (column).

The other case is that if not all rows have 1.ROJO, then I have to keep the lowest process and if there is a tie between the process number, choose from these rows the one with the highest value (column) BUT it is necessary to eliminate from the first row (ordered by process and then by value) to the row with the most advanced 1.ROJO. This last part can be seen in Team C in the initial image.




Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Users online (2,364)