Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago

DAX

Hi, 

I am having an idea but don't know how to execute in DAX. I want to calculate a new column where the product(s) that a specific cliënt has used before the latest product-use is returned. For example:

Product       Cliënt        Earlier product   Date
A               Mrs. Smit            B                 2018
B               Mrs. Smit            A                 2017
A               Mr. Apple           C                 2018

Can anyone help me? 

3 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable
    Why don't you do it in Power Query where such calculations belong? Please note that calculated columns should only be used if THERE IS NO OTHER OPTION. This is because calculated columns have a poor compression rate.

    Best
    Darek
    • Anonymous's avatar
      Anonymous
      Not applicable

      Thanks for the feedback Darek. I am not very familiar with Power Query, but if I was, how would I need to go about it, huh?

       

      Or if u know an R script or a DAX measure that allows me to do this without calculating a new column than I am all ears too.

      • Anonymous's avatar
        Anonymous
        Not applicable
        Mate, the table you've given is not only too small to see what you need but I think the second row is incorrect. Why the heck do you have A in there as the earlier product? Please give us some proper data and explain correctly what you want.

        Thanks.

        Best
        Darek