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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
yuvalpi
Helper I
Helper I

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

1 ACCEPTED SOLUTION
yuvalpi
Helper I
Helper I

found the issue and fixed.

in the data scheme we changed a link to be noth ways instead of one way.

View solution in original post

1 REPLY 1
yuvalpi
Helper I
Helper I

found the issue and fixed.

in the data scheme we changed a link to be noth ways instead of one way.

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

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.

Top Solution Authors