Forum Discussion

Vanessa250919's avatar
3 years ago
Solved

Placeholder issue

 Hello, I have this issue in PBI and I don't understand why ?

tes2 = CALCULATE(DISTINCTCOUNT(V_PBI_EOY[DATE_YYYYMMDD]),KEEPFILTERS([#DELTA_ORG_ACTUALS_METHOD_1] > [#DELTA_ORG_ACTUALS] || [#DELTA_ORG_ACTUALS_METHOD_1] > 1.149))

Someone can help me ?

Thank you

 



  • Hi,

    The issue is caused likely by this part of your DAX: 

    tes2 = CALCULATE(DISTINCTCOUNT(V_PBI_EOY[DATE_YYYYMMDD]),KEEPFILTERS([#DELTA_ORG_ACTUALS_METHOD_1] > [#DELTA_ORG_ACTUALS] || [#DELTA_ORG_ACTUALS_METHOD_1] > 1.149))

    Try placing it into a variable:

    tes2 =
    var _test = [#DELTA_ORG_ACTUALS_METHOD_1] > 1.149 return
    CALCULATE(DISTINCTCOUNT(V_PBI_EOY[DATE_YYYYMMDD]),KEEPFILTERS([#DELTA_ORG_ACTUALS_METHOD_1] > [#DELTA_ORG_ACTUALS] || _test))


    Example with test data:

     


    I hope this post helps to solve your issue and if it does consider accepting it as a solution and giving the post a thumbs up!

    My LinkedIn: https://www.linkedin.com/in/n%C3%A4ttiahov-00001/



2 Replies

  • ValtteriN's avatar
    ValtteriN
    Community Champion

    Hi,

    The issue is caused likely by this part of your DAX: 

    tes2 = CALCULATE(DISTINCTCOUNT(V_PBI_EOY[DATE_YYYYMMDD]),KEEPFILTERS([#DELTA_ORG_ACTUALS_METHOD_1] > [#DELTA_ORG_ACTUALS] || [#DELTA_ORG_ACTUALS_METHOD_1] > 1.149))

    Try placing it into a variable:

    tes2 =
    var _test = [#DELTA_ORG_ACTUALS_METHOD_1] > 1.149 return
    CALCULATE(DISTINCTCOUNT(V_PBI_EOY[DATE_YYYYMMDD]),KEEPFILTERS([#DELTA_ORG_ACTUALS_METHOD_1] > [#DELTA_ORG_ACTUALS] || _test))


    Example with test data:

     


    I hope this post helps to solve your issue and if it does consider accepting it as a solution and giving the post a thumbs up!

    My LinkedIn: https://www.linkedin.com/in/n%C3%A4ttiahov-00001/



    • AlexisOlson's avatar
      AlexisOlson
      Super User

      If [#DELTA_ORG_ACTUALS_METHOD_1] is a measure, then the first condition will be problematic too.