Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
EWBWEBB
Helper II
Helper II

Show next period in table when using a slicer

What I'm trying to achieve.

 

User selects a period from a slicer.

I want a table (visual) to show the actions due in the selected period.

I want a another table (visual) to show the actions due in the next period.

I want a third table (visual) to show the actions due the period after next.

 

My model looks like this

EWBWEBB_0-1686133961171.png


The ABP table is as below

(RSPDuePeriod and DueIndex are both merged from the DimDate & DimPeriod Tables in power query)

EWBWEBB_1-1686134399631.png

 

DimDate is a date table with each date assigned to the relevant period 

EWBWEBB_2-1686134541058.png

 

DimPeriod is a summary of DimDate but with just the periods so I can index each period for the next period etc

EWBWEBB_4-1686134929260.png

 

 

I've tried
SELECTEDVALUE(DimPeriod[Index]) +1 or +2 to get the relevant index but I can't then work out how to make this filter the information in the ABPDeliverables table? or if this is even the right approach

 

I've tried creating a table using SELECTEDVALUE but it appears the tables don't refresh for the value in a slicer.

 

Any help much appreciated - if I need to tweak the model or date tables I can but this feels like it's simple I just can't seem to make it work.

 

Desired outcome.

Select RS_YEARPERIOD 2401 (which equates to index 2)

 

Visual 1 shows rows from ABPDeliverables which have an RSPDuePeriod of 2401 (Index 2)

Visual 2 shows rows from ABPDeliverables which have an RSPDuePeriod of 2402 (Index 3)

Visual 3 shows rows from ABPDeliverables which have an RSPDuePeriod of 2403 (Index 4)

 

I will then want to add in a calculated measure to show a RAG status to each deliverables based on whether the due date is overdue or with X days from today - but that is secondary to showing the three tables.

 

 

1 ACCEPTED SOLUTION

5 REPLIES 5
lbendlin
Super User
Super User

You don't need DimPeriod. It makes your setup more complex. Merge it into DimDate.

 

Please provide sample data (with sensitive information removed) that covers your issue or question completely, in a usable format (not as a screenshot).
https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-...
Please show the expected outcome based on the sample data you provided.

https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447...

@lbendlin thanks for the reply.

 

This is a link to a sample file that contains anonymised data of each table and then a sheet with the desired outcome - hopefully the expected outcome is clear.

 

We Transfer link.

https://we.tl/t-pWF4U6wyXv

 

DimPeriod Table can easily be removed as I only created (by duplicating DimDate) it so I could get a unique list of Periods and apply an index. The plan here was that this meant I could just go with SELECTEDVALUE +1 and then +2 but needless to say that didn't work.

see attached

 

@lbendlin fanatastic thank you - this worked perfectly.

For anyone else coming across this - note that the relationship between the two tables is inactive. 


Makes sense when you think about it but took me a minute to figure that out why the next and next after tables were coming in blank despite the measures working.

Should have mentioned that. I left it in for your future use, but it is not required for your current scenario.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors