Forum Discussion

uif19085's avatar
uif19085
Helper III
3 years ago
Solved

Date Table doesn't filter charts properly

Hello, i have an issue with a Date Table. I have a simple Table with unique IDs, some attribute columns  and an 1:many relationship to a DateTable. If i create a Table visual with columns from the original Table and the Date column from the DateTable and an separate slicer to choose a date, the visual will work, so the Table visual gets filtered, but if i change the Table visual to any other chart/visual doesn't seem to work anymore it shows wrong data. One thing, at some point i observed the totals on the Table visual that seem to gets filtred only works for attributes that have a counter less than 10k, if i choose to filter with an attribute with bigger counter, over 30k it gets stuck with the maximum total, it doesn't gets filtered anymore. I've tried to change Data type, i've looked over Interactions, looked over the relationship and so on. Can you please help me with an advice? 

  • Anonymous's avatar
    Anonymous
    3 years ago

    Hi uif19085 ,

    The cross-filter needs to be changed to Both:

    count of artrfactid = CALCULATE(COUNT('Table1'[ArtefactId]),CROSSFILTER('Table2'[ArtefactId],'Table1'[ArtefactId],Both))

    Best Regards,
    Gao

    Community Support Team

     

    If there is any post helps, then please consider Accept it as the solution  to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

    How to get your questions answered quickly --  How to provide sample data in the Power BI Forum

7 Replies

  • RMDNA's avatar
    RMDNA
    Solution Sage

    Hi uif19085 - for questions like this, it's always helpful to have a data model to play with. Could you create a simplifed version of your data model with fabricated data and sample visuals in a way that replicates the error you're seeing, and post it so we can download?

    • uif19085's avatar
      uif19085
      Helper III

      Hello, RMDNA and thank you for your answer. I manage to create a sample pbix file and indeed seems to have the same problem. Where can i give you the file?

      • RMDNA's avatar
        RMDNA
        Solution Sage

        uif19085 usually users upload them to OneDrive/Google Drive/etc. and share a download link

  • RMDNA's avatar
    RMDNA
    Solution Sage

    Hi uif19085 - at least based on the file you sent, trying to filter data from Table1 via Table2 won't have any effect, because the relationship between Table1 and Table2 only goes in one direction.  

     

     

    Even if you changed that, filtering on Snapshot only changes the artifact ID, and each artifact ID only has one entry in Table1. With no filters at all, you'll only ever have seven records. Filtering on Snapshot will only return matching ArtifactIds, which will always return one record each. 

     

     

    Basically, the model you provided is working as intended, given the data and its setup. If there's another problem for us to solve, it's not captured in this sample.

    • uif19085's avatar
      uif19085
      Helper III

      RMDNA Thank you for your answer, then can you help me with an advice regarding the schema of these tables, which would be the best in terms of performance, my workaround was to bring everything in one table, but i don't want that, is there a better way to have a table with dates and other with data so i can filter on them?

      • Anonymous's avatar
        Anonymous
        Not applicable

        Hi uif19085 ,

        The cross-filter needs to be changed to Both:

        count of artrfactid = CALCULATE(COUNT('Table1'[ArtefactId]),CROSSFILTER('Table2'[ArtefactId],'Table1'[ArtefactId],Both))

        Best Regards,
        Gao

        Community Support Team

         

        If there is any post helps, then please consider Accept it as the solution  to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

        How to get your questions answered quickly --  How to provide sample data in the Power BI Forum