Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago
Solved

AR Aging Amount after adding RATE not working

Hi All

 

I have below expression working fine :-
AR_AMT_ = if(sum(AR[AR_AMT]) =0 , blank(),sum(AR[AR_AMT]))

 

When i add above expression with RATE , it does not work :-

AR_AMT_SGD = if(divide([SALES_],'RATE'[RATE_]) =0 , blank(),divide([SALES_],'RATE'[RATE_]))

 

Can some one share wth me how to make it work ?

 

Paul

 

  • Anonymous's avatar
    Anonymous
    5 years ago

    Hi Anonymous ,

     

    Based on your description, you can create a measure as follows.

    _rate = SUMX(FILTER('RATE',[SOURCE]=SELECTEDVALUE('AR'[SOURCE])),[RATE])
    Result:
     

    Hope that's what you were looking for.

    Best Regards,

    Yuna

     

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

     

     
  • Anonymous's avatar
    Anonymous
    5 years ago

    Hi Anonymous ,

     

    Thanks for your reply.

    In table “AR”, there are only two values(TS and TI) in "Source" field. So TA and TP display NULL.

     

    Best Regards,

    Yuna

11 Replies

  • littlemojopuppy's avatar
    littlemojopuppy
    Community Champion

    Can you share some sample data, the expected result and a screen shot of what it is doing?

  • aj1973's avatar
    aj1973
    Community Champion

    Hi Anonymous 

    Try this:

     

    AR_AMT_SGD =

    Var SalesByRate = divide([SALES_] , [RATE_] , 0)

    Return

    IF(SalesByRAte = 0 , blank() , SalesByRate)

     

     

    • Anonymous's avatar
      Anonymous
      Not applicable

      Hi AJ

      I just try , it return the same wrong result :-

       

      • aj1973's avatar
        aj1973
        Community Champion

        Paul,

        Sorry but you are not telling us what do you want to achieve!! more details would be more helpfull and sharing a PIBX would be even better.

         

  • Anonymous , I doubt that you join with the rate table is not correct. If they from a different table, they should be measures

    A measure  divide([SALES_],[RATE_], blank)

     

    Should work.  But seem like there some issue with rate or sales , because of screenshot

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi Anonymous ,

     

    Sorry, it's still not clear. Can you share some sample data and the expected result to have a clear understanding of your question?

    You can save your files in OneDrive, Google Drive, or any other cloud sharing platforms and share the link here.

     

    Best Regards,

    Yuna

      • Anonymous's avatar
        Anonymous
        Not applicable

        Hi Anonymous ,

         

        Based on your description, you can create a measure as follows.

        _rate = SUMX(FILTER('RATE',[SOURCE]=SELECTEDVALUE('AR'[SOURCE])),[RATE])
        Result:
         

        Hope that's what you were looking for.

        Best Regards,

        Yuna

         

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