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

Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now

Reply
Sushant__08
Regular Visitor

To add a new column in power BI and combine data from two columns

Dear All,

 

I am new to Power BI and currently working on schedule control sheet preparation. We have a start and end dates for multiple categories. And I want to add a new column locating earliest and latest dates for each category. Then, combine start and end dates with "~" to show in the schedule chart.

 

Could you please help ?

 

Sushant__08_0-1721282275762.png

For instance,

 

In the above excel table, For tag number B11-PR-001, I want to display in 3rd column like (1-Jan-25 ~ 15-Jan-25).

 

My intention is to display (1-Jan-25 ~ 15-Jan-25) in power BI visual instead of only earliest / latest date as indicated.

Sushant__08_1-1721282440962.png

 

1 ACCEPTED SOLUTION
bhanu_gautam
Super User
Super User

@Sushant__08 , You can create a new calculated column by going to Data modelling and select new column using below mentioned DAX

 

CombinedDateRange =
VAR EarliestDate = CALCULATE(MIN(Table[Start Date]), ALLEXCEPT(Table, Table[Category]))
VAR LatestDate = CALCULATE(MAX(Table[End Date]), ALLEXCEPT(Table, Table[Category]))
RETURN FORMAT(EarliestDate, "dd-mmm-yy") & " ~ " & FORMAT(LatestDate, "dd-mmm-yy")




Did I answer your question? Mark my post as a solution! And Kudos are appreciated

Proud to be a Super User!




LinkedIn






View solution in original post

3 REPLIES 3
bhanu_gautam
Super User
Super User

@Sushant__08 , You can create a new calculated column by going to Data modelling and select new column using below mentioned DAX

 

CombinedDateRange =
VAR EarliestDate = CALCULATE(MIN(Table[Start Date]), ALLEXCEPT(Table, Table[Category]))
VAR LatestDate = CALCULATE(MAX(Table[End Date]), ALLEXCEPT(Table, Table[Category]))
RETURN FORMAT(EarliestDate, "dd-mmm-yy") & " ~ " & FORMAT(LatestDate, "dd-mmm-yy")




Did I answer your question? Mark my post as a solution! And Kudos are appreciated

Proud to be a Super User!




LinkedIn






Thank you sir. It worked perfectly.

Sushant__08_0-1721284910685.png

 

You are welcome




Did I answer your question? Mark my post as a solution! And Kudos are appreciated

Proud to be a Super User!




LinkedIn






Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

February Power BI Update Carousel

Power BI Monthly Update - February 2026

Check out the February 2026 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.