Forum Discussion

Satyam7054's avatar
Satyam7054
Frequent Visitor
2 years ago
Solved

Power Bi Relationship

Hi,

I am sharing a Power BI file where there are multiple tables, each containing unique Project Name and Date columns, which are consistent across all tables. I am trying to create a dashboard using data from these tables. However, I am facing issues filtering all tables together based on Project Name and Date. I have created separate tables for Project and Date, but I can only filter all tables using either Project or Date, not both simultaneously. When I try to filter using the second slicer, the results are incorrect.

I need to filter based on both Project Name and Date, so that I can fetch data from various tables and filter using both slicers effectively. Can someone help me with this?

Power Bi file 

 

  • Hi Satyam7054 - Please find the following comments:

     

    1. The Count of Project Name card, which is sourced from the Drinking Water table, shows 1 entry on the dashboard when applying the SSI Project and Date filters in Power Query shows no entries. --> Please check in Table view not power query editor.

     

    In data view i have filtered with above combinations. we are getting only 1 project name from Drinking water table with mentioned filters. SSI and 17th May 2024 date.

     

     

     

    you have to build inactive relationship between tables too

    eg: 

     

     

    I have created for VillageName,membername

    Village name count = CALCULATE(DISTINCTCOUNT(Grassroot_Cadre_Database[Village Name]),USERELATIONSHIP(Datetable[Date],Grassroot_Cadre_Database[Membership Date]))
     
    membername count relation = CALCULATE(DISTINCTCOUNT(Grassroot_Cadre_Database[Member Name]),USERELATIONSHIP(Datetable[Date],Grassroot_Cadre_Database[Membership Date]))

     

    visuals are coming as available data results.

     

     

     

    you have to check on the model part. please work on it, if require build the inactive relationships and bring the right values to your visualization using DAX functions. 

    I hope it works. please check

     

    Did I answer your question? Mark my post as a solution! This will help others on the forum!
    Appreciate your Kudos!!

9 Replies

  • Hi Satyam7054 - Just checked your model, can you change the relationship between two tables as below:

     

    instead of Grossroot Table--> Date table

     

    Just verified i can able to filter both project name and date simultaneously and data is getting changed as per backend dataset.

     

     

    Please change the above and let know

     

    Did I answer your question? Mark my post as a solution! This will help others on the forum!
    Appreciate your Kudos!!

    • rajendraongole1's avatar
      rajendraongole1
      Super User

      Hi Satyam7054 - Yes, i have analyzed the file shared. i have taken example for a date highlighted 17-03-2024

       

      Getting the below result when i select the date and project name as per below snapshot:

       

       

      Model FYR: Changed the relationship from Drinking water works to Project master table.

      Above is the expected output as per shared excel file. we are getting. 

       

       

       

      Kindly let me know if that works, if not kindly share what is expected from your end on date level or project master wise.

       

      Did I answer your question? Mark my post as a solution! This will help others on the forum!
      Appreciate your Kudos!!

       

       

      • Satyam7054's avatar
        Satyam7054
        Frequent Visitor

        Hi rajendraongole1 Ji Thank you for your assistance so far, but the issue still isn't resolved. Now, it cannot filter by Village Name, and the Project filter is also not appearing.

        I want to create relationships among all the tables in my Power BI file, making the Project Name and Date slicers the master slicers. This will allow me to filter different tables' projects along with the timeline simultaneously.

        For example, I want to create a dashboard where each table contains some data. I want to filter this data using both the Project slicer and the Date slicer.