Forum Discussion

pva's avatar
pva
Frequent Visitor
4 years ago

Problem with cumulative percentages

Hi all! I have a table with some information about when workers validate some information. It has the following colummns:

 

Division: the division to which the worker belongs.

Department: the department to which the worker belongs.

User_code: the worker's user code.

Document_date: the date of document

Validation_date: the date on which the worker validates the document

Day: the day on which the worker validates the document. It is the result of the subtraction of the two date columns.

Lack of validation: If the worker has validated the document, "NO" will be displayed. If not, the field will be blank.

 

Based on this information, I am trying to create a graph/table showing the evolution of the validation percentage distributed by days ("Day" column).

 

So I made this measures: (note that every row is a document that should be validated)

 

Total validated documents = CALCULATE(COUNTROWS(Hoja1),Hoja1[LACK OF VALIDATION] = "NO")  -- in order to calculate the number of validated documents.
 
Total documents = COUNTROWS(Hoja1)
 
% validate documents = DIVIDE([Total validated documents], CALCULATE([Total documents], ALLSELECTED(Hoja1)))
 
Cumulative % of validation =
CALCULATE(
    [% validate documents],
    FILTER(
ALLSELECTED('Hoja1'[DAY_OF_VALIDATION]),
        ISONORAFTER('Hoja1'[DAY_OF_VALIDATION], MAX('Hoja1'[DAY_OF_VALIDATION]), DESC)
    )
)
 
So I've created a table with this measures but the result is not what I looking for:
 

 

In the % cumulative validation is not making the addition properly.

 

Also If I filter the table by the column "Division" the result in not correct.

 

Could you please help me??

 

Thanks in advanced. I've attached the .pbix 

PBI Example 

1 Reply

  • v-henryk-mstf's avatar
    v-henryk-mstf
    Icon for Community Support rankCommunity Support

    Hi pva ,

     

    What is the actual business logic? Besides the fact that there is an error in the filtered value 610? Is it filtering the results correctly?


    Looking forward to your reply.


    Best Regards,
    Henry