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

Score big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount

Reply
Foguete
Helper I
Helper I

Add a column to a table and summarize into it based on 2 filters

Hello,

 

As I am new to Power BI, I am facing an issue.

 

I have the below table:

Foguete_1-1667400713303.png

 

I would need for everyday, to know the total of "Pallets_Stock" of grouped "AUX".

 

For example.

Let's say AUX "187N", "170N", and "030N" are part of a family I want to create called "Family 1"; I would need the return below:

 

Foguete_2-1667401035331.png

 

I need to say that an AUX can also we used in another family.

 

Anyone could help me but also explain to me the way ?

 

Kind regards

 

 

2 ACCEPTED SOLUTIONS
Greg_Deckler
Community Champion
Community Champion

@Foguete Well, probably best to create an Enter Data query like below. You could create a relationship between the tables based on the AUX columns. It will be many-to-many but that shouldn't cause an issue in most circumstances.

Family AUX
Family 1 187N
Family 1 170N
Family 1 030N
Family 2 777N
Family 2 666N
Family 2 555N
Family 3 187N
Family 3 555N
Family 3 457N


Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

View solution in original post

Hi again,

 

I think I have found the solution or at least it's working

 

Instead of SUMMARIZE, as I was using different columns I used SUMMARIZECOLUMNS which gave this result in DAX:

 

Tabla_Stock_Informe =
SUMMARIZECOLUMNS(
    QueryKeynes[JDFEC],
    'Filtros Tiendas'[Tienda],
    "TOTAL PALLETS_STOCK", SUM(QueryKeynes[PALLETS_STOCK])
)
 
Thank you for the help !

View solution in original post

3 REPLIES 3
Greg_Deckler
Community Champion
Community Champion

@Foguete Well, probably best to create an Enter Data query like below. You could create a relationship between the tables based on the AUX columns. It will be many-to-many but that shouldn't cause an issue in most circumstances.

Family AUX
Family 1 187N
Family 1 170N
Family 1 030N
Family 2 777N
Family 2 666N
Family 2 555N
Family 3 187N
Family 3 555N
Family 3 457N


Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Hi @Greg_Deckler, thanks for the answer !

 

I have been creating the data entry and edit the relationship as the screenshot below:

Foguete_0-1667464327338.png

 

Now I am facing a new issue, at the moment of creating a new table to get something similar to the screenshot below:

Foguete_1-1667464411894.png

 

My DAX is telling me that it does not found the "Family" column (I changed the name family for "Tiendas"):

Foguete_2-1667464476658.png

 

Any idea about what did I do wrong ?

 

 

Hi again,

 

I think I have found the solution or at least it's working

 

Instead of SUMMARIZE, as I was using different columns I used SUMMARIZECOLUMNS which gave this result in DAX:

 

Tabla_Stock_Informe =
SUMMARIZECOLUMNS(
    QueryKeynes[JDFEC],
    'Filtros Tiendas'[Tienda],
    "TOTAL PALLETS_STOCK", SUM(QueryKeynes[PALLETS_STOCK])
)
 
Thank you for the help !

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

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