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

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

Reply
fmigg
New Member

Creating a table based on another table Column Value

Hi guys! 

I'm new on Power BI and DAX, such in this community Man Happy

Currently I have a dataset with the following structure:
Table 1
pbi 2.png

In which Revenues column collect the correct revenue according Phase column. Also each ID could have different types like (A Banking, A Software, B Banking etc)

What I'd like to do is to create a new table with the correct Revenue according the maximum value of Phase on each ID+Type combination, something like this.
Table 2

pbi 1.png 

Currently what I was doing was to add in the original table a new column called [ID + Type] which it just concatenates ID and Type: 
pbi 3.png

Then, I tried to create a new table using SUMMARIZEDCOLUMNS:

 

Table2 = SUMMARIZECOLUMNS(
	Table1[ID + Type],
	"ID", SELECTEDVALUE(Table1[ID]),
	"Budget", CALCULATE(SELECTEDVALUE(Table1[Revenue]),SELECTEDVALUE(Table1[Phase]) = MAX(Table1[Phase]))
)

But this is not working, since MAX(Table1[Phase]) is always getting a 6 instead the max Phase number for each [ID + Type] value.

Is this possible get solved in DAX?

 

 P.S. I'm new in adding this questions to communities, if something need to be corrected such title or content please let me now and I will do the corrections 🙂 

 

------------------------------------------ UPDATE 

I forgot to mention, if the value of Phase is the maximum (6 in this example, there is no greater value on Phase than 6) it should SUM all revenues for each ID + Type, for example: 

pbi 6.png

 

For ASoftware there are two Revenues has 6, so it must be SUM in the created table.

pbi 5.png

 

1 ACCEPTED SOLUTION
v-danhe-msft
Microsoft Employee
Microsoft Employee

Hi @fmigg,

Based on my test, you could refer to below steps:

Create a calculated column in your row table:

filtered value = IF([Phase]=CALCULATE(MAX('Table1'[Phase]),FILTER('Table1','Table1'[Column]=EARLIER(Table1[Column]))),[Revenue],0)

1.PNG

Create a new table:

New Table = SUMMARIZE('Table1','Table1'[Column],'Table1'[ID],"A",CALCULATE(SUM('Table1'[filtered value])))

Result:

1.PNG

 

You could also download the pbix file to have a view.

 

Regards,

Daniel He

Community Support Team _ Daniel He
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

3 REPLIES 3
v-danhe-msft
Microsoft Employee
Microsoft Employee

Hi @fmigg,

Could you please tell me if your problem has been solved? If it is, could you please mark the helpful replies as Answered?

 

Regards,

Daniel He

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

Hi, 

 

I am trying to do the same. Where can I add a new table based on another table?

Looking at the PBIX it was not done in the query editor right?

 

Struggling with this, hope someone can give an easy explanation here.

 

Thanks in advance!

 

Regards,

Siem

v-danhe-msft
Microsoft Employee
Microsoft Employee

Hi @fmigg,

Based on my test, you could refer to below steps:

Create a calculated column in your row table:

filtered value = IF([Phase]=CALCULATE(MAX('Table1'[Phase]),FILTER('Table1','Table1'[Column]=EARLIER(Table1[Column]))),[Revenue],0)

1.PNG

Create a new table:

New Table = SUMMARIZE('Table1','Table1'[Column],'Table1'[ID],"A",CALCULATE(SUM('Table1'[filtered value])))

Result:

1.PNG

 

You could also download the pbix file to have a view.

 

Regards,

Daniel He

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

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

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.