Forum Discussion
Summing Values BETWEEN Two Dates AND Count consecutive days In Power BI
- Anonymous4 years ago
Hi Anonymous ,
Create measure.
mod_measure = MOD(MAX('Table'[rank]),2)Over_TWO_measure = var _current=SUMX(FILTER(ALL('Table'),'Table'[Date]=MAX('Table'[Date])),[count]) var _next= IF( MAX('Table'[Date])=MINX(ALL('Table'),'Table'[Date]),_current, SUMX(FILTER(ALL('Table'),'Table'[Date]=MAX('Table'[Date])-1),[count])) return IF( _current=_next&&MAX([count])>=2&&[mod_measure]=0,1,0)Result:
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Hi Anonymous ,
According to the rule: the [Count] of two consecutive dates is the same, and the latter date is displayed as 1.
The count of 2022.3.6 is 3, and the count of 2022.3.7 is 4. The counts of two consecutive dates are inconsistent, and both appear 0.
What is the result you want to get, can you express it with pictures?
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- Anonymous4 years agoNot applicable
According to the rule: continuous two days and both over 3 count calculate 1 and Do not double count dates
thank you
1.I want to filter 3/7~3/29 && Defect=BBBB calculate like it
2.I want to filter 3/9~3/29 && Defect=BBBB calculate like it
3.If I want to change calculate count is over_4 how to change measure?
I want to filter 3/12~3/29 && Defect=AAAAA calculate like it