Forum Discussion
lagacem
5 years agoFrequent Visitor
Count Number of Rows Based on Filter From Current Row
Hello all, Looking for help on this as I can get it to work in Excel but am having a hard time figuring it out in Power BI. What I'm trying to accomplish is to have at the end of each row, a coun...
- 5 years ago
Hi @lagacem,
You can try the next option:
#StillOpenedInc = VAR currentResolvedDate = SELECTEDVALUE('Table'[Resolved_date]) VAR Result = COUNTROWS(FILTER( ALL('Table'), currentResolvedDate > 'Table'[Opened_date] && currentResolvedDate < 'Table'[Resolved_date] )) RETURN IF(ISBLANK(Result), 0, Result)
ERD
5 years agoCommunity Champion
Hi @lagacem,
You can try the next option:
#StillOpenedInc =
VAR currentResolvedDate = SELECTEDVALUE('Table'[Resolved_date])
VAR Result =
COUNTROWS(FILTER(
ALL('Table'),
currentResolvedDate > 'Table'[Opened_date] &&
currentResolvedDate < 'Table'[Resolved_date]
))
RETURN IF(ISBLANK(Result), 0, Result)- lagacem5 years agoFrequent Visitor
Works great thanks so much!