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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

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
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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