Forum Discussion

Razorbx13's avatar
Razorbx13
Icon for Post Patron rankPost Patron
6 years ago

Question on Calculations

I have the below data.  What I need to do is track total sales and total transactions, and when either of these go over their threshold then the date gets placed in the Date Threshold Met, but it is the date of the first of the month.  Then that date never changes.  Is there a way to populate the Date Threshold Met and then not have it change, as once it is met it is done.  Basically what I have is several rows by product.

 

Thanks in advance!

 

Total SalesTotal TransactionsSales ThreshodTransaction ThresholdDate Threshold Met 
95000178100000200  

 

6 Replies

  • jthomson's avatar
    jthomson
    Icon for Solution Sage rankSolution Sage

    Without seeing your data more clearly, I'd guess the way to do it would be to make some sort of cumulative sum measure on sales for the month, then work out the lowest value for where that measure is higher than your threshhold value?

    • Razorbx13's avatar
      Razorbx13
      Icon for Post Patron rankPost Patron

      Basically the sales and counts will increase each night the data is refreshed. The thresholds are static.  I just want first of the month to go into the date field when the threshold is met.  So if it is met on August 21, 2020 the date would be August 1, 2020 and then would never change.

      • v-lili6-msft's avatar
        v-lili6-msft
        Icon for Community Support rankCommunity Support

        hi  Razorbx13 

        What is the meet date? do you mean it is the date of refresh date? If so, it is not achieve in power bi, since whether it's a calculate or custom column or a measure, they all depends on their row context, it means, after you refresh data, it will recalculate again based on their row context.

         

        Regards,

        Lin