Forum Discussion
DAX does not function as expected in X-Axis date field
Hi,
we have a DAX that generates a descending linear line based on start and finish dates of a project and numerical value of items.
the problem that we are facing is that the start and end dates of the line does not change according to the selected project in the slicer.
here is the DAX:
LinearLine =
var startweek = MIN('Snapshots (2)'[update_date_sunday])
VAR EndWeek = MAX('project & date'[Finish_date_sunday])
VAR StartValue = CALCULATE(sum( 'Snapshots (2)'[RemainingDays]) ,FILTER('Snapshots (2)', 'Snapshots (2)'[update_date_sunday] = StartWeek))VAR Slope = (0- StartValue) / ((EndWeek - StartWeek))
VAR CurrentWeek = SELECTEDVALUE('Calendar'[Week])
var X = if (CurrentWeek>= startweek && CurrentWeek <= EndWeek , StartValue + Slope * (CurrentWeek - StartWeek) , StartValue)
RETURN X
appreciate if anyone can help.
Thank you,
Yuvalpi
found the issue and fixed.
in the data scheme we changed a link to be noth ways instead of one way.
1 Reply
- yuvalpiHelper I
found the issue and fixed.
in the data scheme we changed a link to be noth ways instead of one way.