Forum Discussion

Christina_R's avatar
Christina_R
Regular Visitor
3 years ago
Solved

DAX formula not recognizing period (.)

Hi,

I have an issue with a measure i try to create for calculating the profit target as 10% higher than the previous month's profit.

So I create a measure like this

Profit Target =
[Previous Month Profit] * 1.1
 
But unfortunately what it actually calculates is [previous Month Profit] * 11!!!
How can i fix this?
 
Many thanks!
Christina
  • Hi all

     

    thanks for your help

    The issue now is fixed, after i applied my Windows settings to match the ones of Power BI.

     

    For Windows i had comma (,) as decimal seperator and this seems to have been overruling the settings of Power BI

     

    Christina

12 Replies

  • DoubleJ's avatar
    DoubleJ
    Solution Supplier

    Hi
    That's strange, seems to be some locale issue. As a workaround you could : 
    [Previous Month Profit] * 110/100

    Hope this helps
    JJ

    • Christina_R's avatar
      Christina_R
      Regular Visitor

      Hi Jj

      thanks!

      i did that already as a workaround but just was wondering if there is an actual fix

       

      Christina

       

  • Hi Christina;

    I've tried to create a measure the exact same way you did with your [Target Area] and it worked fine on my laptop.
    So I would need to see how you created the measue [Previous Month Profit] in order to better understand what may not going well with measure [Profit Target].


    • Christina_R's avatar
      Christina_R
      Regular Visitor

      Hi 

      thanks!

      that's the previous month profit measure

       

      Previous Month Profit =
      CALCULATE(
          [Total Profit],
          DATEADD(
              'Calendar Lookup'[Date],
              -1,
              MONTH
          ))
      • flath's avatar
        flath
        Helper II

        Hi,

        Insteade of using "DATEADD", have you tried using PREVIOUSMONTH?

        It would be like this:

        CALCULATE(
            [Total Profit],
            PREVIOUSMONTH('Calendar Lookup'[Date])
            )




  • Hi,

    Share the download link of the PBI file and show the problem there clearly.

  • Christina_R's avatar
    Christina_R
    Regular Visitor

    Hi all

     

    thanks for your help

    The issue now is fixed, after i applied my Windows settings to match the ones of Power BI.

     

    For Windows i had comma (,) as decimal seperator and this seems to have been overruling the settings of Power BI

     

    Christina