Forum Discussion
Running total with condition
Hello All,
Am facing dificuties in wriign measure for the below scenario.
If Running Total is <= 80 then True and in the range of 80.1 to 80.9 make it TRUE for the First occurrence record only. (NOTE:Data is sorted by Asenceing order)
Below is the sample data and expected output.
Running Total T or F
44.04 True
77.2 True
80.21 True
80.31 False
97.93 False
98.96 False
100 False
Hi tnarenderr
Thanks for reaching out to us.
>> If Running Total is <= 80 then True and in the range of 80.1 to 80.9 make it TRUE for the First occurrence record only. (NOTE:Data is sorted by Asenceing order)
you can try this measure,
Measure = var _min=CALCULATE(MIN('Table'[Running Total]),FILTER(ALL('Table'),'Table'[Running Total]>80)) return IF(MIN('Table'[Running Total])<=80 || MIN('Table'[Running Total])=_min,TRUE(),FALSE())Best Regards,
Community Support Team _Tang
If this post helps, please consider Accept it as the solution to help the other members find it more quickly.
Thanks for your response. how to rewrite measure if Running Total is also a measure.
3 Replies
- v-xiaotangCommunity Support
Hi tnarenderr
Thanks for reaching out to us.
>> If Running Total is <= 80 then True and in the range of 80.1 to 80.9 make it TRUE for the First occurrence record only. (NOTE:Data is sorted by Asenceing order)
you can try this measure,
Measure = var _min=CALCULATE(MIN('Table'[Running Total]),FILTER(ALL('Table'),'Table'[Running Total]>80)) return IF(MIN('Table'[Running Total])<=80 || MIN('Table'[Running Total])=_min,TRUE(),FALSE())Best Regards,
Community Support Team _Tang
If this post helps, please consider Accept it as the solution to help the other members find it more quickly.
- tnarenderrFrequent Visitor
Thanks for your response. how to rewrite measure if Running Total is also a measure.
- v-xiaotangCommunity Support
Hi tnarenderr
Please try
Measure = var _min= minx(FILTER(ALL('Table'),[Running Total]>80),[Running Total]) return IF([Running Total]<=80 || [Running Total]=_min,TRUE(),FALSE())Best Regards,
Community Support Team _Tang
If this post helps, please consider Accept it as the solution to help the other members find it more quickly.