Forum Discussion

fsouza_ata's avatar
fsouza_ata
Frequent Visitor
7 years ago

help with calculated column

Boa noite Pessoal, alguém pode me ajudar com esta formula DAX, estou usando em uma coluna calculada, mas estou com dificuldade para usar um filtro com período.

Na imagem 1 (https://imgur.com/UH936TQfunciona como o esperado, já na imagem 2 (https://imgur.com/Ou4K7lL), ao colocar um período maior, os dados não batem.

Qualquer ajuda é bem vinda, desde de já agradeço.

 

2 Replies

  • v-cherch-msft's avatar
    v-cherch-msft
    Microsoft Employee

    Hi fsouza_ata 

    I would suggest you create a measure instead of calculated column to get the dynamic count.Please try below measure in picture.If it is not your case,please follow the How to Get Your Question Answered Quickly to post your simple assumed data and expected output.It would be better if you can upload the .pbix file to OneDrive and post the link here. Do mask sensitive data before uploading.

    Regards,

    • fsouza_ata's avatar
      fsouza_ata
      Frequent Visitor

      Hi v-cherch-msft , That still has not worked the way I need it.

      These are the images for ease of understanding, I need to tell the column "id_apontamento" within the period.

       

      Image 1 is the problem. this is my DAX now:

       

      Coluna = CALCULATE(COUNT(fDados_Servico[ID_APONTAMENTO]);
      DATESBETWEEN(fDados_Servico[DATA];FIRSTDATE(dCalendario[DATA]);LASTDATE(dCalendario[DATA]));
      ALLEXCEPT(fDados_Servico;fDados_Servico[ID_APONTAMENTO]))

       

       

       

       

      in this period works.