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
th340385
Helper I
Helper I

Dax Measure Help

Hello, 

 

I have a dataset that I am trying to calculate the total number of rows >= a specific stage number. 

 

My current measure is

Count by Stage = CALCULATE([Count All Rows], FILTER(ALLSELECTED('Data'), 'Data'[Stage#] >= max('Data'[Stage#])))

 

Current Output: 

Stage #1234567
# of rows in stage         22,543         21,749         21,351         14,379           7,407           6,088         5,466

 

This measure calculates the correct number of rows for each stage; however, I was hoping to have cumulative number of rows greater than or equal to each stage.

 

Desired result is below:

 

Stage #1234567
# of rows in stage         98,983         76,440         54,691         33,340         18,961         11,554         5,466
1 ACCEPTED SOLUTION

PBI file attached.

Hope this helps.

Ashish_Mathur_0-1712123948774.png

 


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

View solution in original post

15 REPLIES 15
Ashish_Mathur
Super User
Super User

Hi,

Share the download link of the PBI file.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Unfortunately I am not able to provide same data. However, it is a very simple table with only two fields.  I think the first part of my measure is working correctly, but I want to aggregate the result even further as shown below:

PBIX DAX Measure Help1.PNGPBIX DAX Measure Help2.PNG

I will need some file to work with.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Stage
1
1
1
1
1
2
2
2
3
3

The table above is very simple sample data that can be used in a pbix file. See below for updated screenshot of current measure and desired result using the sample data: 

 

PBIX DAX Measure Help4.PNG

Hi,

This works for me

C = COUNTA(Data[Stage])
Measure = CALCULATE([C],FILTER(ALL(Data[Stage]),Data[Stage]>=MIN(Data[Stage])))

Ashish_Mathur_0-1712102241286.png

 


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Thank you, but I am able to get that measure to work. I am trying to get step two (see below). I would like to see the cummulative count at each stage. 

 

Stage #123
Cummulative #1772

PBI file attached.

Hope this helps.

Ashish_Mathur_0-1712123948774.png

 


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

This was perfect! Thank you!

You are welcome.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

I cannot assist you if you are unable to provide sample data. I hope someone else can help you further.

Stage
1
1
1
1
1
2
2
2
3
3

 

The table above is very simple sample data that can be used in a pbix file. See below for updated screenshot of current measure and desired result using the sample data: 

 

PBIX DAX Measure Help4.PNG

lbendlin
Super User
Super User

please provide the definition for [Count All Rows]

[Count All Rows] is just a measure that counts all rows of the 'data' table. 

 

Count All Rows = COUNTROWS('Data')

Please provide sample data that covers your issue or question completely, in a usable format (not as a screenshot).

Do not include sensitive information or anything not related to the issue or question.

If you are unsure how to upload data please refer to https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-...

Please show the expected outcome based on the sample data you provided.

Want faster answers? https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447...

Unfortunately I am not able to provide same data. However, it is a very simple table with only two fields.  I think the first part of my measure is working correctly, but I want to aggregate the result even further as shown below:

PBIX DAX Measure Help1.PNGPBIX DAX Measure Help2.PNG

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.