This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. We're covering it all. You won't want to miss it.
Learn moreGet Fabric Certified for FREE during AI Skills Fest. This week only. Secure your voucher now.
Hello everyone,
Could you please help me with the following?
The following table has an ID and finish date when one ID wasn't finish the closed date is blank. Now I want to count the lines that are in blank in the previous days according to the finish date like the example on the table:
Hi,
Write this calculated column formula
Column = COALESCE(CALCULATE(COUNTBLANK(Data[Closed Date]),FILTER(Data,Data[Finish Date]<EARLIER(Data[Finish Date]))),0)
Hope this helps.
Certainly! Let’s break down the task step by step:
Understanding the Problem:
Approach:
Solution:
DAX Formula:
Accumulated =
VAR CurrentFinishDate = MyTable[Finish Date]
RETURN
CALCULATE(
COUNTROWS(MyTable),
FILTER(
MyTable,
MyTable[Finish Date] = CurrentFinishDate &&
ISBLANK(MyTable[Closed Date])
)
)Explanation:
Result:
Here’s how the first few rows of your updated table might look:
ID Finish Date Closed Date Accumulated| 1 | 11/23/2023 | 11/23/2023 | 0 |
| 2 | 11/23/2023 | Blank | 0 |
| 3 | 11/23/2023 | 11/23/2023 | 0 |
| 4 | 11/24/2023 | 11/24/2023 | 1 |
| … | … | … | … |
Remember to adjust the table and column names according to your actual data. If you encounter any issues or need further assistance, feel free to ask! 😊
Hello, thank you for the help.
I put the formula and it calculates the blank lines but for the same date, not the blank lines for previous dates. Could you help me again?
The line inside FILTER that compares
MyTable[Finish Date] = CurrentFinishDate
should be
MyTable[Finish Date] <= CurrentFinishDate
or
MyTable[Finish Date] < CurrentFinishDate
Let me know how this goes.
Check out the May 2026 Power BI update to learn about new features.
Sign up to receive a private message when registration opens and key events begin.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
| User | Count |
|---|---|
| 25 | |
| 24 | |
| 22 | |
| 19 | |
| 18 |
| User | Count |
|---|---|
| 43 | |
| 42 | |
| 41 | |
| 21 | |
| 21 |