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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
KH11NDR
Helper IV
Helper IV

Open Dashboard with last 2 reporting weeks as default (not last previous 2 weeks from current date)

ValuesDateReporting Week Hi Guys, What I need is for my dashboard tab to open with the last two reporting weeks as default, so data showing for weeks "26/03/2018 & 02/04/2018", not last two current weeks from todays date.  Thanks guys 
10001/01/201801/01/2018 
20001/01/201808/01/2018 
30001/01/201815/01/2018 
40001/01/201822/01/2018 
50001/01/201829/01/2018 
60001/02/201805/02/2018 
70001/02/201812/02/2018 
80001/02/201819/02/2018 
90001/02/201826/02/2018 
100001/03/201805/03/2018 
110001/03/201812/03/2018 
120001/03/201819/03/2018 
130001/03/201826/03/2018 
140001/04/201802/04/2018 
1 ACCEPTED SOLUTION
v-danhe-msft
Employee
Employee

Hi @KH11NDR,

Based on my test, you could refer to below steps:

Add index column in query editor.

1.PNG

Create a calculated column

Type = IF([Index]=MAX('Table1'[Index]),"Last 2",IF([Index]=MAX([Index])-1,"Last 2","Not Last two"))

2.PNG

Filter the "Last 2" in Report level filters and now you could get the result.

3.PNG

 

Regards

Daniel He

Community Support Team _ Daniel He
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

4 REPLIES 4
KH11NDR
Helper IV
Helper IV

Thanks guys, I'm sure both worked, but I used the bottom one, tweaked it a bit and it works like a treat.

v-danhe-msft
Employee
Employee

Hi @KH11NDR,

Based on my test, you could refer to below steps:

Add index column in query editor.

1.PNG

Create a calculated column

Type = IF([Index]=MAX('Table1'[Index]),"Last 2",IF([Index]=MAX([Index])-1,"Last 2","Not Last two"))

2.PNG

Filter the "Last 2" in Report level filters and now you could get the result.

3.PNG

 

Regards

Daniel He

Community Support Team _ Daniel He
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
KH11NDR
Helper IV
Helper IV

Any takers?

Hi

 

 

You can create a column using Power Query by sorting the date column descending and add an index column and then add a conditional column 

 

= Table.AddColumn(#"Added Index", "Custom", each if [Index] <= 14 then "Last 2 weeks" else "Not last 2 weeks")

 

or you could create a Calculated Column

 

DAX Column = IF([Date]<=CALCULATE(MAX(Reporting[Date]);ALL(Reporting))-14;"Not Last 2";"Last 2")

 

And then insert the column as a slicer and set the value to last 2 and publish the report

 

/Erik

 

 

 

 

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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