Forum Discussion

emf_efab's avatar
emf_efab
Frequent Visitor
5 years ago
Solved

Count First Value in Column - for a day

I need to count the Values "Estado" (Bold & Blue) in the Column for each day, not Repeating the same ESTADO, reaching a final result of 10, over the 13 rows.

 

Example: 

1Feb = 1 

2Feb = 1

26Feb = 1

 

 

IDFechaEstadoEmail
101-FebOrder Entryemail1
201-FebOrder Entryemail2
302-FebOrder Entryemail3
420-FebPendiente de Codigoemail4
526-FebPendiente de Codigoemail5
626-FebPendiente de Codigoemail6
703-MarPendiente de Codigoemail7
803-MarOrder Entryemail8
903-MarPendiente de Revisionemail9
1003-MarAprobadoemail10
1103-MarAprobadoemail11
1211-MarPendiente de Revisionemail12
1311-MarAprobadoemail13
    

 

  • Hi emf_efab 

     

    Download PBIX

     

    You can do this with this measure

    Count Estado = COUNTROWS(DISTINCT(SELECTCOLUMNS('Control Emails', "NewCol", 'Control Emails'[Fecha]&'Control Emails'[Estado])))

    Regards

    Phil

8 Replies

  • Hi emf_efab 

     

    Download PBIX

     

    You can do this with this measure

    Count Estado = COUNTROWS(DISTINCT(SELECTCOLUMNS('Control Emails', "NewCol", 'Control Emails'[Fecha]&'Control Emails'[Estado])))

    Regards

    Phil

    • emf_efab's avatar
      emf_efab
      Frequent Visitor

      Thank you very much Phil, regards Steve

  • HI emf_efab 

    Not following the logic for what to count.

    You've highlighted the first Estado for 1-Feb, 2-Feb, 20-Feb and 26-Feb but then you've highlighted multiple things for 3-Mar and 11-Mar.

    Regards

    Phil

    • emf_efab's avatar
      emf_efab
      Frequent Visitor

      Phil,

      Thanks for helping...I need to count the "Estado" no matter what the estado is for a day, but NOT REPEATING the same "estado" for a same day.

      I need to keep control of all the single ESTADOS in the complete rows.

      So in the example you have 13 rows but the ocurrences are 10 without repeating the ESTADO.

      Whope you understand me this time.

      • PhilipTreacy's avatar
        PhilipTreacy
        Super User

        Hi emf_efab 

        Right, I understand now.

        How do you want this count presented?  As a single number as the result of a measure?

        Regards

        Phil