Forum Discussion
Federico92
5 years agoNew Member
Running Count for Selected Values
Hi everyone, I'm new to power by and I want to obtain this results from my data
What I want to do is a running count based on the value in fields "Assigned To" that is numerically sorted like in the image below
Any suggestions? Thanks
Hi Federico92 ,
this seems to work.
Count = VAR OrderID = 'Sample Data'[Order] RETURN CALCULATE ( COUNTROWS ( 'Sample Data' ), FILTER ( ALLEXCEPT ( 'Sample Data', 'Sample Data'[Group] ), 'Sample Data'[Order] <= OrderID ) )
3 Replies
- mwegenerMost Valuable Professional
Hi Federico92 ,
can you provide sample data and describe which column is used for sorting?
In the image with the expected result, I don't see any reference to the "Assigned To" column.- Federico92New Member
https://drive.google.com/file/d/1pTdvJHx7GQokfhmI4AiOxQIkWtCxR5WC/view?usp=sharing
I simplified the problem to make it easier to understand. In the linked PBIX I would like to get the results in the "Expected Results" column. What I want it to do is calculate a distinct running count for each value of the "Group" column.- mwegenerMost Valuable Professional
Hi Federico92 ,
this seems to work.
Count = VAR OrderID = 'Sample Data'[Order] RETURN CALCULATE ( COUNTROWS ( 'Sample Data' ), FILTER ( ALLEXCEPT ( 'Sample Data', 'Sample Data'[Group] ), 'Sample Data'[Order] <= OrderID ) )