Forum Discussion

RSD's avatar
RSD
Helper II
6 years ago
Solved

DAX

Hi Team,

 

I Would like to show "106.8%" in Card , But unable to write DAX. It should be Avg Forecast Accuracy of Previous months .(March)

 

Note: All columns are in list are Measures Except Year and Month.

 

Regards,

Rupesh Dhage

 

 
  • Hi RSD ,

     

    We can use the following measure to meet your requirement.

     

    Show Last Month = 
    CALCULATE (
        [FYTD Avg Accuracy],
        'Table'[date]
            >= DATE ( YEAR ( TODAY () ), MONTH ( TODAY () ) - 1, 1 ),
        'Table'[date] < DATE ( YEAR ( TODAY () ), MONTH ( TODAY () ), 1 )
    )

     

     

    If it doesn’t meet your requirement, could you please show the exact expected result based on the table that we have shared?

    BTW, pbix as attached.

     

    Best regards,

     

    Community Support Team _ zhenbw

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

5 Replies

  • RSD there are many ways to achieve this but it is important to what DAX expression is used in  FYTD

  • v-zhenbw-msft's avatar
    v-zhenbw-msft
    Community Support

    Hi RSD ,

     

    We can use the following measure to meet your requirement.

     

    Show Last Month = 
    CALCULATE (
        [FYTD Avg Accuracy],
        'Table'[date]
            >= DATE ( YEAR ( TODAY () ), MONTH ( TODAY () ) - 1, 1 ),
        'Table'[date] < DATE ( YEAR ( TODAY () ), MONTH ( TODAY () ), 1 )
    )

     

     

    If it doesn’t meet your requirement, could you please show the exact expected result based on the table that we have shared?

    BTW, pbix as attached.

     

    Best regards,

     

    Community Support Team _ zhenbw

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

    • RSD's avatar
      RSD
      Helper II

      Hey v-zhenbw-msft ,

       

      It contains time intelligence Calculations of FYTD(Finacial Year to date) and hence it was behaving weird.Even though somehow I managed to get same functionality , but i like your solution. Thanks for your help .Much Appreciated!!.

       

      Regards,

      RSD