The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
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 ?
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.
Solved! Go to Solution.
@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")
Proud to be a 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")
Proud to be a Super User! |
|
Thank you sir. It worked perfectly.
You are welcome
Proud to be a Super User! |
|