Forum Discussion

Zyg_D's avatar
Zyg_D
Continued Contributor
6 years ago
Solved

Create table containing only rows with minimum values from every category

Hello again. 

I tried to create a summarized table without some rows. This is the data table: 

 

I want to only show rows containing minimum values from specific category. This is the desired result. 

 

 

I tried the following formula, but it returns all 4 rows instead of 3. 

result_table = 
SUMMARIZE(
    Table1, 
    Table1[Category], 
    Table1[Value2], 
    "Value", MIN(Table1[Value])
)

  

  • Zyg_D , you can create a table like

    summarize(Table, Table[Category], "Value", min(Table[Value]), "Value2", max(Table[Value2]))

     

    or can use a measure like this with Category in a visual min(Table[Value]) and max(Table[Value2])

2 Replies

  • Zyg_D , you can create a table like

    summarize(Table, Table[Category], "Value", min(Table[Value]), "Value2", max(Table[Value2]))

     

    or can use a measure like this with Category in a visual min(Table[Value]) and max(Table[Value2])

  • Zyg_D because you are also summarizing on value2 column and combination of category and value2 is unique in all 4 rows and that's why you are getting all rows.

     

    Do you need value2 in summarize table?

     

    I would  Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos whoever helped to solve your problem. It is a token of appreciation!

    Visit us at https://perytus.com, your one-stop-shop for Power BI-related projects/training/consultancy.