Forum Discussion

miinseon's avatar
miinseon
Icon for Helper I rankHelper I
2 years ago
Solved

line chart and trend chart between two dates

Hi all 🙂

I created a line chart and a metrics chart where values change based on two selected dates.
For the two dates, I created two from & to tables with columns for each.
Then I created a measure to get the values I wanted.
The line chart came out just as I wanted.
However, the metrics chart looks like the image below.
The first month doesn't show the previous month's value and the last month adds an extra month.

I'll attach the file : pbix 

 

 

Please let me know how to fix it if you can.

Thanks

7 Replies

    • miinseon's avatar
      miinseon
      Icon for Helper I rankHelper I

      can i ask one more thing??

      i modify ratio dax to show ratio like â–² 13.5 %

      but all date columm shown like bwelow image

      my modified dax 

      ratio =
      var _Alpha = DIVIDE ( ( [@_trend_cnt] - [@_trend_cnt_pm] ), [@_trend_cnt_pm] )
      var _Beta = ABS(_Alpha)

       RETURN
          IF(_Alpha > 0, FORMAT(_Beta,"â–² #,##0.0"), FORMAT(_Beta,"â–¼ #,##0.0"))
      • Jihwan_Kim's avatar
        Jihwan_Kim
        Icon for Super User rankSuper User

        Hi,

        Please try adding %, something like below, whether it suits your requirement.

         

        ratio =
        var _Alpha = DIVIDE ( ( [@_trend_cnt] - [@_trend_cnt_pm] ), [@_trend_cnt_pm] )
        var _Beta = ABS(_Alpha)
        
         RETURN
            IF(_Alpha > 0, FORMAT(_Beta,"â–² #,##0.0%"), FORMAT(_Beta,"â–¼ #,##0.0%"))