Forum Discussion
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 Sales | Total Transactions | Sales Threshod | Transaction Threshold | Date Threshold Met | |
| 95000 | 178 | 100000 | 200 |
6 Replies
- jthomson
Solution 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?
- parry2k
Super User
Razorbx13 Read this post to get your answer quickly.
https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490 - Razorbx13
Post 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
Community 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