0
votes

In my Power BI report I have a date slicer and a clustered column chart. In the chart I want to display how much events occurred per hour. For that I have a data table like this:

Date        Hour      Count
01.01.2019  07:00:00  4
01.01.2019  09:00:00  9
03.01.2019  07:00:00  1
07.01.2019  10:00:00  14
and so on ... 

The charts x-axis displays the hour, y-axis the count.

Now I want to be able to filter the chart by date when I change the date range in the slicer. For example when I set the slicer to the range from 04.01.2019 to 10.01.2019, the chart should display the hour histogram only of these 7 days.

Hope you have an idea what I want to do.

Thanks in advance!

EDIT

I've found out why it is not working. The report contains multiple charts, each bound to an own data table. Each table has a date column. The slicer uses one of these date columns, but not the one of the data used by the clustered column chart. Now the date column of the clustered column chart can contain one date multiple times. But the date column which is used by the slicer contains each date only once.

The data table used by the slicer looks like this:

Date some other columns
01.01.2019 ...
02.01.2019 ...
04.01.2019 ...
...

Each date is contained once at the most in contrast to the date column of the first table, where each date can appear more than once. Because of this the slicer works for the one chart but not for the other.

1

1 Answers

0
votes

Ok, found the solution and it is very easy. All you have to do is to create a relationship between the date column of table two and the date colum of table one. The slicer uses the date column of table two. If you change the date range now this affects the clustered column chart too.