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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

How to creat a new table have all of columns from the value of a column of another table

Hi Eveyon

I am new and i speak english not well.

Pls help me for this case:

I have table name: "NL_TH" 

VN_GN_0-1624676586771.png

So, I want creat new table as below

VN_GN_1-1624676706221.png

I cannot user pivot and unpivot because Table :NL_TH is not original data .

Thank for help

1 ACCEPTED SOLUTION
v-yangliu-msft
Community Support
Community Support

Hi  @Anonymous ,

Here are the steps you can follow:

1. Create calculated table.

Table =
SUMMARIZE('NL_TH',NL_TH[month])

2. Create calculated column.

A =
CALCULATE(SUM('NL_TH'[value]),FILTER('NL_TH','NL_TH'[DONVI]="A"&&'NL_TH'[month]=EARLIER('Table'[month])))
B =
CALCULATE(SUM('NL_TH'[value]),FILTER('NL_TH','NL_TH'[DONVI]="B"&&'NL_TH'[month]=EARLIER('Table'[month])))
C = CALCULATE(SUM('NL_TH'[value]),FILTER('NL_TH','NL_TH'[DONVI]="C"&&'NL_TH'[month]=EARLIER('Table'[month])))
D = CALCULATE(SUM('NL_TH'[value]),FILTER('NL_TH','NL_TH'[DONVI]="D"&&'NL_TH'[month]=EARLIER('Table'[month])))

3. Result:

vyangliumsft_0-1624848562222.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

3 REPLIES 3
Anonymous
Not applicable

Thanks for help

v-yangliu-msft
Community Support
Community Support

Hi  @Anonymous ,

Here are the steps you can follow:

1. Create calculated table.

Table =
SUMMARIZE('NL_TH',NL_TH[month])

2. Create calculated column.

A =
CALCULATE(SUM('NL_TH'[value]),FILTER('NL_TH','NL_TH'[DONVI]="A"&&'NL_TH'[month]=EARLIER('Table'[month])))
B =
CALCULATE(SUM('NL_TH'[value]),FILTER('NL_TH','NL_TH'[DONVI]="B"&&'NL_TH'[month]=EARLIER('Table'[month])))
C = CALCULATE(SUM('NL_TH'[value]),FILTER('NL_TH','NL_TH'[DONVI]="C"&&'NL_TH'[month]=EARLIER('Table'[month])))
D = CALCULATE(SUM('NL_TH'[value]),FILTER('NL_TH','NL_TH'[DONVI]="D"&&'NL_TH'[month]=EARLIER('Table'[month])))

3. Result:

vyangliumsft_0-1624848562222.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.

 

ryan_mayu
Super User
Super User

@Anonymous 

have you tried to use matrix to display this?

1.PNG





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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