Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredJoin us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.
Hello!
Anybody knows how calculate "How many times in a row there is no availability counted from the last date"
hi @bjurek
try to add a calculated column like:
Column =
VAR _currentdate = tbl[Date]
VAR _table = FILTER(tbl, tbl[Shop]=EARLIER(tbl[Shop]))
VAR _stopdate =
MAXX(
FILTER(
_table,
tbl[Date]<_currentdate
&&tbl[value]=1
),
tbl[Date]
)
VAR RESULT=
IF(
tbl[Value]=0&&tbl[Date]=MAXX(_table, tbl[date]),
COUNTROWS(
FILTER(
_table,
tbl[Date]<=_currentdate
&&tbl[Date]>_stopdate
)
),
BLANK()
)
RETURN RESULT
it worked like:
@bjurek , if you need a new column
if([Date] = maxx(filter(Table, [Shop] = earlier([Shop])), [Date]) , Countx(filter(Table, [Shop] = earlier([Shop]) && [availability] =0 ), [Date]) , blank())
for measures
if(MAx([Date]) = maxx(filter(allselected(Table), [Shop] = max([Shop])), [Date]) , Countx(filter(allselected(Table), [Shop] = Max([Shop]) && [availability] =0 ), [Date]) , blank())
Hi, thanks for help, however its not work. Instead show value 8 it show 13 = (8+5 from 2023-01-01 to 2023-01-10)
Can you check ?
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the October 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 8 | |
| 6 | |
| 3 | |
| 3 | |
| 3 |
| User | Count |
|---|---|
| 11 | |
| 9 | |
| 8 | |
| 7 | |
| 6 |