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

Get inspired! Check out the entries from the Power BI DataViz World Championships preliminary rounds and give kudos to your favorites. View the vizzies.

Reply
ZunzunUOC
Resolver III
Resolver III

Add column to new table

Hi again, I have a table (Report Diario) with the next columns:

 

AGREEMENT DATEEND DATEAMOUNTREGION

 

In a new table (CalendarioAdelantado) I have the next columns:

DATEAMOUNT

 

On the last table, column amount is a calculated column with the next code:

 

Amount = CALCULATE(SUM('Report Diario'[Signed Monthly Billing In Local Currency]);FILTER('Report Diario';AND(CalendarioAdelantado[Date]<'Report Diario'[Agreement Date];AND(CalendarioAdelantado[Date]>'Report Diario'[End Date];NOT(ISBLANK('Report Diario'[End Date]))))))

 

That said, I need to add a new column on the CalendarioAdelantado table with the column "Region". Thus, If I have

AGREEMENT DATEEND DATEAMOUNTREGION
01/07/201915/06/2019100SOUTH
01/07/201915/06/2019100NORTH
01/07/201915/06/2019100EAST
01/07/201915/06/2019100SOUTH

 

I need the next result:

 

DATEAMOUNTREGION
15/06/2019200SOUTH
15/06/2019100EAST
15/06/2019100NORTH

 

Any idea? Thanks.

 

 

 

1 ACCEPTED SOLUTION

Finally, here the solution:

 

Table = SELECTCOLUMNS(FILTER(CROSSJOIN(CALENDAR("01/01/2018";"01/01/2020");'Report Diario');[Date]>='Report Diario'[Fecha de Cierre]&&[Date]<='Report Diario'[Fecha Comprometida] && NOT(ISBLANK('Report Diario'[Fecha de Cierre])));"FECHA";[Date];"REGION";'Report Diario'[Sales Region];"ADELANTADO";'Report Diario'[Signed Monthly Billing In Local Currency])

I found it in another forum. Thanks.

View solution in original post

3 REPLIES 3
v-frfei-msft
Community Support
Community Support

Hi  @ZunzunUOC ,

 

Please refer to the below expression to generate the calculate table:

 

Table = SUMMARIZE('Report Diario',[AGREEMENT DATE],'Report Diario'[END DATE],[REGION],"Amount",SUM('Report Diario'[AMOUNT]))

summ.png

 

Community Support Team _ Frank
If this post helps, then please consider Accept it as the solution to help the others find it more quickly.

Hi @v-frfei-msft , thanks for your effort.

 

I going to try to explaing better:

 

I have the next table:

 

reply002.png

 

And I need to show the next:

 

reply003.png

 

In every day I have between, agreement and end-Date, I need to show a data per region.

 

Finally, here the solution:

 

Table = SELECTCOLUMNS(FILTER(CROSSJOIN(CALENDAR("01/01/2018";"01/01/2020");'Report Diario');[Date]>='Report Diario'[Fecha de Cierre]&&[Date]<='Report Diario'[Fecha Comprometida] && NOT(ISBLANK('Report Diario'[Fecha de Cierre])));"FECHA";[Date];"REGION";'Report Diario'[Sales Region];"ADELANTADO";'Report Diario'[Signed Monthly Billing In Local Currency])

I found it in another forum. Thanks.

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code FABINSIDER for a $400 discount!

FebPBI_Carousel

Power BI Monthly Update - February 2025

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

March2025 Carousel

Fabric Community Update - March 2025

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

Top Kudoed Authors