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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Ayx11
Frequent Visitor

Specific Dax calculation

I am new in DAX calculation/measure and I would like to know if it is possible to do this. 

Information is below 

StatusAverage (caluation from 1A to C6)Average (caluation from 3B to C6)Average (caluation from 5C to 6C)
1A

 22 Weeks

  
2A   
3B 15 weeks 
4B   
5C  7 weeks 
6C - Completion   

 

1. Is there a way to duplicate the value to another row e.g. 1B is the same as 1A.  

 

2 . These calculations are from last years average. I would like to use these to forecast the future date. 

    E.g. if the status is A1 = the date is entered December 1 -  22 weeks = estimate time of completion.

 

3. Would it be possible to put in one column?

 

1 ACCEPTED SOLUTION
Abhinav054
Helper I
Helper I

Hii, once use the following commands, Just add your table name in it



1) DuplicateValue =
                                          VAR CurrentRow = CURRENTROW()
                                          VAR CurrentStatus = [Status]
                                           VAR DuplicateRow = LOOKUPVALUE('YourTableName',
                                                               'Status', CurrentStatus, 'Status')
                                            RETURN
                                             IF(
                                                  ISBLANK(DuplicateRow),
                                                       CurrentRow[Value], DuplicateRow[Value] )

2) EstimatedCompletionDate =
                                      VAR CurrentRow = CURRENTROW()
                                      VAR CurrentStatus = [Status]
                                      VAR AverageDuration = CALCULATE(
                                      AVERAGE('YourTableName', 'Value'),
                                      FILTER('YourTableName', 'Status' = CurrentStatus))
                                      VAR StartDate = [Date]
                                       RETURN
                                       StartDate + AverageDuration

3) CombinedMeasure =
VAR CurrentRow = CURRENTROW()
VAR CurrentStatus = [Status]
VAR DuplicateValue = LOOKUPVALUE(
'YourTableName',
'Status',
CurrentStatus,
'Status'
)
VAR EstimatedCompletionDate = CALCULATE(
AVERAGE('YourTableName', 'Value'),
FILTER('YourTableName', 'Status' = CurrentStatus)
)
RETURN
IF(
ISBLANK(DuplicateRow),
EstimatedCompletionDate,
DuplicateValue
)

View solution in original post

2 REPLIES 2
Ayx11
Frequent Visitor

Currentrow () is not available 

Abhinav054
Helper I
Helper I

Hii, once use the following commands, Just add your table name in it



1) DuplicateValue =
                                          VAR CurrentRow = CURRENTROW()
                                          VAR CurrentStatus = [Status]
                                           VAR DuplicateRow = LOOKUPVALUE('YourTableName',
                                                               'Status', CurrentStatus, 'Status')
                                            RETURN
                                             IF(
                                                  ISBLANK(DuplicateRow),
                                                       CurrentRow[Value], DuplicateRow[Value] )

2) EstimatedCompletionDate =
                                      VAR CurrentRow = CURRENTROW()
                                      VAR CurrentStatus = [Status]
                                      VAR AverageDuration = CALCULATE(
                                      AVERAGE('YourTableName', 'Value'),
                                      FILTER('YourTableName', 'Status' = CurrentStatus))
                                      VAR StartDate = [Date]
                                       RETURN
                                       StartDate + AverageDuration

3) CombinedMeasure =
VAR CurrentRow = CURRENTROW()
VAR CurrentStatus = [Status]
VAR DuplicateValue = LOOKUPVALUE(
'YourTableName',
'Status',
CurrentStatus,
'Status'
)
VAR EstimatedCompletionDate = CALCULATE(
AVERAGE('YourTableName', 'Value'),
FILTER('YourTableName', 'Status' = CurrentStatus)
)
RETURN
IF(
ISBLANK(DuplicateRow),
EstimatedCompletionDate,
DuplicateValue
)

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.