Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
3 years ago

Use different date filter on one table

Hi all,

I hope someone can help me because I think I tried nearly everything but I couldn't solve my problem.

 

The situation is as followed.

I have one main table containing employee details for 2 years. I have corporate titel, date, names etc in the table.

I want to build a dashboard, where the user can compare the corporate title distribution for two different dates. For that I created two new tables. Each of them contains distinct date values from the main table. I named the new tables Date 1 and Date 2. I created a 1:n  relationship between Date 1 and main table. The same for Date 2 table. 

Then I created two charts showing the headcount per corporate title base on the main table. One chart is filtered by a slicer based on Date 1. The second chart is filtered by a slicer on Date 2.

So far so good.

Now comes the problem.

I want to provide the employee detail in one table. 

If the user clicks on 'MD' in chart one and this chart is filtered on lets say 01.2023 I want the table to be filtered on only MD's in 01.2023.

If the user clicks on 'VP' in chart two which is filtered on 07.2022 I want the table to be filtered on only VP's for 07.2022.

I created new measures where I tried to figure out which date is filtered and use that as a filter on my table. 

The problem is, that the result in the table is always the date in Date 1.

 

I tried another solution with synchronizing slicers but in that case the result is, that for the first selection it works, but as soon as I select another date, the table tries to filter ont he already filtered results which is NULL. I tried to include removefilters in my DAX code but it's not working.

 

Does anyone have a clever idea how I can solve this problem?

I included a screenshot of the dashboard if that helps.

 

Thanks in advance!!

 

Cheers

Dilek

3 Replies

  • Anonymous I probably have some ideas, if possible, share pbix using one drive/google drive and make sure to remove sensitive information before sharing. 

    • Anonymous's avatar
      Anonymous
      Not applicable

      Hi parry2k,

       

      Unfortunately all of that is blocked by the firewall. I'm working on my company laptop. I also can't save it on an USB to do it via my personel laptop. 
      If you could share your idea here that would be great! 🙂

       

  • Anonymous maybe you can create a dummy data in excel and use that in the Power BI and share that one.