Don't miss your chance to take the Fabric Data Engineer (DP-700) exam on us!
Learn moreWe've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now
I want to count number of records before date. For example,
| Iteration.StartDate | Iteration.EndDate | NewStateWithStartDate.ChangedDate | Column |
| 01-01-2021 00:00 | 18-07-2021 00:00 | 15-07-2021 12:46 | 44130 |
| 01-01-2021 00:00 | 18-07-2021 00:00 | 11-03-2021 21:18 | 44130 |
| 01-01-2021 00:00 | 18-07-2021 00:00 | 11-03-2021 21:18 | 44130 |
| 01-01-2021 00:00 | 18-07-2021 00:00 | 11-03-2021 21:18 | 44130 |
So in my Column there should be 4 rows if I put condition `Iteration.StartDate < NewStateWithStartDate.ChangedDate,
I written DAX function for calculating count of rows,
Column = SUMX( JoinTable, IF ( EARLIER (JoinTable[Iteration.StartDate]) <= JoinTable[NewStateWithStartDate.ChangedDate], 1, 0 ) )
I want range of StarDate and EndDate must be less than ChangedDate.
In my actual problem there are so many StartDate, EndDate and ChangedDate.
Solved! Go to Solution.
Hi @rajendrabhole ,
Please try to create DAX like below:
Column 2 = COUNTROWS(FILTER('Table','Table'[Iteration.StartDate]<='Table'[NewStateWithStartDate.ChangedDate]&&'Table'[Iteration.EndDate]<='Table'[NewStateWithStartDate.ChangedDate]))
Best Regards,
Liang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @rajendrabhole ,
Please try to create DAX like below:
Column 2 = COUNTROWS(FILTER('Table','Table'[Iteration.StartDate]<='Table'[NewStateWithStartDate.ChangedDate]&&'Table'[Iteration.EndDate]<='Table'[NewStateWithStartDate.ChangedDate]))
Best Regards,
Liang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
| User | Count |
|---|---|
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |
| User | Count |
|---|---|
| 4 | |
| 3 | |
| 2 | |
| 2 | |
| 2 |