Microsoft Fabric Community Conference 2025, March 31 - April 2, Las Vegas, Nevada. Use code FABINSIDER for a $400 discount.
Register nowGet inspired! Check out the entries from the Power BI DataViz World Championships preliminary rounds and give kudos to your favorites. View the vizzies.
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 Accumulated1 | 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.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the February 2025 Power BI update to learn about new features.
User | Count |
---|---|
90 | |
82 | |
57 | |
41 | |
37 |