cancel
Showing results for
Did you mean:
Member

## Matrix Rows Based on Date Slicer

Hello community,

Is it possible to have a date slicer dynamically changing a Matrix rows?

For instance: if min date of slicer is 28/nov/18 (today) Matrix rows should displays all days of last week.

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Support Team

## Re: Matrix Rows Based on Date Slicer

Hi @Fcoatis

To workaround this,

1.create a new table as a new calnedar table used in slicer.

`enter in "New Table"slicer table = CALENDAR("01/01/18","12/31/18")Create calculated columns in this tableWeeknum = WEEKNUM([Date],2)`
2. add 'slicer table'[date] in the slicer instead of Calendar[date].
create measures in  'slicer table'
```min selected = MIN('slicer table'[Date])

weeknum_selected = WEEKNUM([min selected])

weeknum_selected-1 = WEEKNUM([min selected])-1

LastWholeWeek = IF(MAX('Calendar'[Weeknum])=WEEKNUM([min selected])-1,1,0)```
3. add in Visual level filter as below

Finally,

Please see my solution in Page5

Best Reagrds
Maggie
6 REPLIES 6
Member

## Re: Matrix Rows Based on Date Slicer

Hi,

I think you can use a relative date slicer for this.

https://docs.microsoft.com/en-us/power-bi/visuals/desktop-slicer-filter-date-range

Member

## Re: Matrix Rows Based on Date Slicer

Thanks for the suggestion,

but I have a Visual that depends on current date slicer filter, I wanted the other one (Matrix) to dynamicaly change rows.

Best regards

Member

## Re: Matrix Rows Based on Date Slicer

Hi,

i think you have to think different. :-)

The date slicer filters on page level and should return the date range.

The more granular filter for the visual, you should set on the visual level.  (Maybe with a Top filter on Date.)

Highlighted
Community Support Team

## Re: Matrix Rows Based on Date Slicer

Hi @Fcoatis

To workaround this,

1.create a new table as a new calnedar table used in slicer.

`enter in "New Table"slicer table = CALENDAR("01/01/18","12/31/18")Create calculated columns in this tableWeeknum = WEEKNUM([Date],2)`
2. add 'slicer table'[date] in the slicer instead of Calendar[date].
create measures in  'slicer table'
```min selected = MIN('slicer table'[Date])

weeknum_selected = WEEKNUM([min selected])

weeknum_selected-1 = WEEKNUM([min selected])-1

LastWholeWeek = IF(MAX('Calendar'[Weeknum])=WEEKNUM([min selected])-1,1,0)```
3. add in Visual level filter as below

Finally,

Please see my solution in Page5

Best Reagrds
Maggie
Member

## Re: Matrix Rows Based on Date Slicer

Thank you Maggie,

That´s what I was trying to figure out.

Kind regards.

Fabio Coatis

Member

## Re: Matrix Rows Based on Date Slicer

Just for those interested in my adaptation of Maggie´s solution, I´m sharing the knowledge.

Thank you guys.

Announcements

#### Community News & Announcements

Get your latest community news and announcements.

#### Power Platform Summit North America

Register by September 5 to save \$200

#### Microsoft Business Applications Virtual Launch Event

Watch the event on demand for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

#### Watch Sessions On Demand!

Continue your learning in our online communities.

Top Kudoed Authors
Users Online
Currently online: 378 members 3,295 guests
Recent signins: