Forum Discussion

gpaula's avatar
gpaula
Frequent Visitor
5 years ago
Solved

I need count values in another no related table

I have 4 tables. First one with region, day and a grade, second one with the region details and a third one with month and a collumn with the information about the grade necessity (yes or no) for witch month in the year and the last one is the calendar table. 

 

I want a tale with the regions, information about necessity of grade (table3) and the count of grades (table1), it is possible do that with mesuares? It s important that i can use date filter in the dashboard, like the picture below.

 

PS: i cant conect table 1 and 3 because the many to many conection.

  • Hi gpaula ,

     

    To my understand, "Month" column in Table 3 represents each month. It should be matched with one column represents each month, too. 

     

    Therefore, please create a Month column in your Calendar table and use this column to create relationship between Calendar table and Table 3 like below.

    Month = EOMONTH([Date],-1)+1

     

    Then you can get what you want:

    For more details, please check the attached .pbix file.

     

     

    Best Regards,

    Icey

     

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

3 Replies

  • HI gpaula 

     

    Can you share a sample of your table data?

     

    Appreciate your Kudos!!

     

    • gpaula's avatar
      gpaula
      Frequent Visitor

      Hi. Of course.

       

      Table 1

      RegionCodRegionDayGrade
      A0118/10/202110
      B0218/10/20219
      A0119/10/20219
      B0220/10/20218
      C0320/10/20219

       

      Table 2:

      CodRegionDetail1Detail2
      01xxxyyy
      02aaabbb
      03cccddd

       

      Table3:

      CodRegionMonthRequested?
      0101/10/2021yes
      0101/11/2021no
      0201/10/2021yes
      0201/11/2021yes
      0301/10/2021yes
      0301/11/2021yes

       

      Is it enough? 

  • Icey's avatar
    Icey
    Icon for Community Support rankCommunity Support

    Hi gpaula ,

     

    To my understand, "Month" column in Table 3 represents each month. It should be matched with one column represents each month, too. 

     

    Therefore, please create a Month column in your Calendar table and use this column to create relationship between Calendar table and Table 3 like below.

    Month = EOMONTH([Date],-1)+1

     

    Then you can get what you want:

    For more details, please check the attached .pbix file.

     

     

    Best Regards,

    Icey

     

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.