Forum Discussion
Date Slicer not working | Power BI Report
Hi,
I have created a Power BI report in which I am using a Date Slicer.
I have two tables in which Date is present in first table whereas second table is a group by visualization of the same data on a column(product).
I have a Table say :
| DateTime | Product | SubProduct | Amount |
| 01-10-2021 10:00:10 | A | A1 | 100 |
| 03-10-2021 10:00:10 | A | A2 | 200 |
| 01-10-2021 10:00:10 | A | A3 | 300 |
| 03-10-2021 10:00:10 | B | B1 | 50 |
| 05-10-2021 10:00:10 | B | B2 | 100 |
Another grouped table exist in which grouping has been done on Product and looks like:
| Product | Amount |
| A | 600 |
| B | 150 |
When using Date slicer, the first table updates the changes whereas, the second table doesn't get updated. Both these tables are linked by Many to One relation on Product column and Cross filter direction has been given as: Both.
Kindly provide me your input for what can be done in this situation or if I need to make some changes in my approach.
Thanks
- Anonymous5 years ago
Hi Viktor001 ,
So what is the expected result when selecting 03-10-2021 in the slicer?
Product Amount A 600 B 150 or
Product Amount A 200 B 150 You are using Product as relationship and there's no SubProduct column in second table so the result would be the first table above.
Best Regards,
Jay
2 Replies
- AnonymousNot applicable
Hi Viktor001 ,
So what is the expected result when selecting 03-10-2021 in the slicer?
Product Amount A 600 B 150 or
Product Amount A 200 B 150 You are using Product as relationship and there's no SubProduct column in second table so the result would be the first table above.
Best Regards,
Jay
- DuncanP
Advocate II
Hi Viktor001
I'm not sure exactly why it's not working, but I can see a couple of things that you could do differently that would help.
First off, you don't need the second table at all. You should get the same result by only selecting the relelvant columns (Product and Amount) from the first table for the visual, as Power BI will do the grouping for you.
Second, I would convert the datetime column to a date and link it to a separate date table. You can find many examples of date tables online, created either in DAX or Power Query.
Finally, I would create a measure for Amount, rather than rely on Power BI's own aggregating, but that's my preference.
The first one should fix your issue; the other two are options but good practice.
I hope that helps.
Duncan