Forum Discussion
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 # | 1 | 2 | 3 | 4 | 5 | 6 | 7 |
| # 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 # | 1 | 2 | 3 | 4 | 5 | 6 | 7 |
| # of rows in stage | 98,983 | 76,440 | 54,691 | 33,340 | 18,961 | 11,554 | 5,466 |
PBI file attached.
Hope this helps.
15 Replies
- lbendlinSuper User
please provide the definition for [Count All Rows]
- th340385Helper I
[Count All Rows] is just a measure that counts all rows of the 'data' table.
Count All Rows = COUNTROWS('Data')- lbendlinSuper User
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-Forum/ba-p/963216
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/1447523
- Ashish_MathurSuper User
Hi,
Share the download link of the PBI file.
- th340385Helper I
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:
- lbendlinSuper User
I cannot assist you if you are unable to provide sample data. I hope someone else can help you further.