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

Score big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount

Reply
Fox93i
New Member

Connection table that helps me filter range of dates when selecting just one

Hi everyone,

I explain you my problem.

I need to create a table that helps me filter periods in the following way: for each ISO week selected in the slicer, I got returned the selected week, the previous one and the following one.

I'm trying to make it by ranking the ISO Weeks and use the ranks in order to make it possible to apply the +1/-1 logic.

 

My desired result should be a table like the following one:

Selected ISO Week (Rank), Returned ISO Week (Rank)
1, 0

1, 1

1, 2

2, 1

2, 2

2, 3

3, 2

3, 3

3, 4

 

and so on.

I've already tried multiple ways to make it in DAX but 0% successfull. Can anybody help me? 🙂

2 REPLIES 2
Ahmedx
Super User
Super User

this code in power query

let
    Source = {1..53},
    #"Converted to Table" = Table.FromList(Source, Splitter.SplitByNothing(), null, null, ExtraValues.Error),
    #"Added Custom" = Table.AddColumn(#"Converted to Table", "Custom", each {0..53}),
    #"Expanded Custom" = Table.ExpandListColumn(#"Added Custom", "Custom")
in
    #"Expanded Custom"

 

 Screenshot_1.png

Ahmedx
Super User
Super User

try this

table = GENERATE(GENERATESERIES(1,53),SELECTCOLUMNS(GENERATESERIES(0,53),"Value2",[Value]))

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

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