Forum Discussion

MKPartner's avatar
MKPartner
Helper II
3 years ago
Solved

Calculated TREND line but wrong displayed X axis

Hello Team,    I trying to show trend line on my graphs using tweak linear regresion DAX code as below:    Score Trend = VAR Known = FILTER ( SELECTCOLUMNS ( ALLSELECTED...
  • v-jingzhang's avatar
    3 years ago

    Hi MKPartner 

     

    Do you use Month End Date column on X axis? If so, it will move one month right to the next month because Power BI will adjust the axis display values automatically according to the width of the visual. As the month end date is near the start date of next month, it moves to the next month.

     

    To avoid this, it is recommended to use a date column like Month Start date on the axis. Based on your current DAX, you can try

    WC_Month = EOMONTH('COQ Calendar'[Year] & " " & 'COQ Calendar'[Month_2],-1) + 1

     

    Best Regards,
    Community Support Team _ Jing
    If this post helps, please Accept it as Solution to help other members find it.