Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
ozgurozturk98
Frequent Visitor

Counting rows

Hi all,

 

I'm trying to count the total rows where SOLLAST is less than or equal to the Date. I want something like this.

 

testt.png

1 ACCEPTED SOLUTION

@ozgurozturk98 Please try this..

 

TotalRows = CALCULATE(COUNT(TestCount[SOLLAST]),
                      FILTER(ALL(TestCount),TestCount[SOLLAST]=EARLIER(TestCount[Date])))

image.png





Did I answer your question? Mark my post as a solution!

Proud to be a PBI Community Champion




View solution in original post

3 REPLIES 3
Anonymous
Not applicable

@ozgurozturk98,

Could you please describe more details about the logic you use to calculate the above expected result?

I am not sure about how you get 2,5,1 based on the sample data.


Regards,
Lydia

@Anonymous

 

Well you can consider the left column (date) as the current date. The SOLLAST describes the total orders.

 

E.G.

 

On the date 10-6-2018 there are two times a solllast with the same date. So ''Date" has a total row of 2.

@ozgurozturk98 Please try this..

 

TotalRows = CALCULATE(COUNT(TestCount[SOLLAST]),
                      FILTER(ALL(TestCount),TestCount[SOLLAST]=EARLIER(TestCount[Date])))

image.png





Did I answer your question? Mark my post as a solution!

Proud to be a PBI Community Champion




Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.