Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hello,
I want to create a calculated column which calculates the cumulative count of rows in this column. It shall not be based on other columns like for example "Year". Something like in the picture below, similar to an index column.
Thanks for your help.
Solved! Go to Solution.
Hi @Johnsie,
Has I refered you need context and currently there is no option to get only a countrows without telling the columns you want to refer to.
Going back to the question when you say that you don't want the column to be filtered when you apply a filter in the visual what do you mean? You always want it to be there with values from 1 to N correct?
Using the ALLSELECTED will give you that continues number now matter what are the filters you apply.
Example
2021 - 1
2022 - 2
2023 - 3
Whith Filter
2022 - 1
2023 - 2
Is that what you need?
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsHi @Johnsie ,
Dax calculations are based on context so if you do not add anhy other columns to your calculation then the result will not be achieved how you need, when you refer that you don't want to have it based on another column is it because the column may vary or because you can be applying filters to your calculation?
Check if this post may help, I know it's based on another column but as I refered DAX is context based.
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsHey @MFelix
thanks for your answer.
It is because I dont want this column to be filtered if I apply a filter in a visual.
Is there a possibility to count the rows with COUNTROWS() based solely on how many rows there are in the table?
Hi @Johnsie,
Has I refered you need context and currently there is no option to get only a countrows without telling the columns you want to refer to.
Going back to the question when you say that you don't want the column to be filtered when you apply a filter in the visual what do you mean? You always want it to be there with values from 1 to N correct?
Using the ALLSELECTED will give you that continues number now matter what are the filters you apply.
Example
2021 - 1
2022 - 2
2023 - 3
Whith Filter
2022 - 1
2023 - 2
Is that what you need?
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsThe Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
Check out the November 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 66 | |
| 47 | |
| 43 | |
| 26 | |
| 19 |
| User | Count |
|---|---|
| 196 | |
| 127 | |
| 102 | |
| 67 | |
| 49 |