Forum Discussion
tranguyen
2 years agoFrequent Visitor
Sum for next row based on condition
Hi everyone. I am a fresher in Power BI. Please help to look at 2 pictures below. - Week wash is a column - Rank is a column that was created by week wash and month - Distinctcustomerbycategory...
- Anonymous2 years ago
Hi tranguyen ,
Try below:
_Value = MAX('Table'[Value]) Measure = var _v = [_Value] var _pre = ADDCOLUMNS('Table',"pre",SUMX(FILTER(ALL('Table'),[Rank]=EARLIER('Table'[Rank])-1),[_Value])) RETURN IF(_v<=2,"blank",IF(SUMX(_pre,[pre])<=2,_v+SUMX(_pre,[pre]),_v))Hope it helps!
Best regards,
Community Support Team_ Scott ChangIf this post helps then please consider Accept it as the solution to help the other members find it more quickly.
amitchandak
Super User
2 years agotranguyen , use new table levels calculation , previous should help in this case
🚀 Power BI Update: Visual calculations (preview)🚀
https://powerbi.microsoft.com/en-us/blog/visual-calculations-preview/
tranguyen
2 years agoFrequent Visitor
After updating a new Power BI. What should I do now to solve my problems?