Forum Discussion
Cumulative count split by attribute's values
Hi Anonymous
Should be the ALLSELECTED, you can do like this
# of ReqID =
CALCULATE(COUNTROWS(VALUES(Tabelle1[ReqID])), Tabelle1[ModifiedDate]<=MAX(Tabelle1[ModifiedDate]))
Thanks a lot for your answer, Vera.
There is still something missing though: now the sums in lines don't add up. For 3rd and 4th, there should be a 1 for AGREED, too.
(Sorry, I can't get the formatting nice on my "expected results" table.)
- Anonymous3 years agoNot applicable
Hi Anonymous
If the AGREED should have 1 as cumulative, then why the other two do not have? The total still doesn't add up...I had a another date table, did not use the date column in the same table.
You need to explain your logic
- Anonymous3 years agoNot applicable
Thanks again for looking into my problem, Vera!
So, I got 3 requirements in total, but not from the first day onwards.
On 2nd, there is only 1.
On 3rd, another one is added (112233). Total count is 2. But 1 requirement is AGREED, the other new one is PARTLY_AGREED.
On 4th, the new one (112233) changes its state to NOT_AGREED. Total count is still 2, but now there is still the one from the beginning (AGREED) and now one in NOT_AGREED. So, a "1" is expected to appear twice.
On 5th, the requirement 112233 is finally agreed, total count is still 2 and therefore all 2 are AGREED.
On 6th another new requirement is added, therefore the total count is 3, and they are all AGREED (=3 in that column).
- Anonymous3 years agoNot applicable
Hi Anonymous
I am not sure how many scenarios you might have, say NOT_AGREED and PARTLY_AGREED will only appear once for each requirement? you need to go through all scenarios...here is one based on your sample only
# of ReqID = VAR CurDate=MAX(Dates[Date]) RETURN IF(SELECTEDVALUE('Tabelle1'[Status])="NOT_AGREED"||SELECTEDVALUE('Tabelle1'[Status])="PARTLY_AGREED", CALCULATE(COUNTROWS(VALUES(Tabelle1[ReqID])),Tabelle1[ModifiedDate]=CurDate), CALCULATE(COUNTROWS(VALUES(Tabelle1[ReqID])),Tabelle1[ModifiedDate]<=CurDate))