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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Anonymous
Not applicable

Dynamic Display Columns when Fiscal Week selected in slicer(Rolling 4 Weeks Columns)

Dear All,

 

Need help - please refer below screenshot with complete details

 

Capture1.PNG

7 REPLIES 7
Anonymous
Not applicable

Hi @Santosh_kumar,

You can refer to following steps if they suitable for your requirement.
Steps:
1. Create new calculated table.

Fiscal week = DISTINCT(Product[Fiscal Week]).

2. Create new measure.

Measure =
VAR currWeek =
    SELECTEDVALUE ( Product[Fiscal Week] )
RETURN
    IF (
        AND (
            currWeek
                >= MIN ( 'Fiscal week'[Fiscal Week] ) - 3,
            currWeek <= MIN ( 'Fiscal week'[Fiscal Week] )
        ),
        SUM ( Product[Pct] ),
        BLANK ()
    )

Note: “Product” table is the original table I defined.

16.png

If above not helps, please share some sample data for test.

Best Regards,

Jack

Anonymous
Not applicable

Hi @Anonymous , i have tried using above logic but unable to get dynamic level changes, screenshot below -

 

Capture2.PNG

 

 

 

 

 

 

here is the dataset and pbxi file, click on hyperlink below -

Dataset  & Destop File

Anonymous
Not applicable

Hi @Santosh_kumar,

I attached my test file below, you can take a look on it.

Best Regards,

Jack Chen

Anonymous
Not applicable

HI @Anonymous,

 

The above isnt is working, below are the link to download dataset and pbix file, 

 

Can you please help and use numerator and denominator for Percentage calc

 

here is the dataset and pbxi file, click on hyperlink below -

Dataset  & Destop File

 

Thanks,

Santosh

Anonymous
Not applicable

This one works, when we do not select anything for the last 4 weeks. calc can be changed. I doubt because of single table remove the filter, all is not working, when we select a value

 

 

Efficiency_% = var _selweek = maxx(Sheet1,SELECTEDVALUE(Sheet1[Fiscal Week]))
var _Year = left(_selweek,4)
Var _week =RIGHT(_selweek,2)
var _weeknew = if(_week-4>0,_week-4,_week-4+52)
var _YearNew = if(_week-4>0,_Year,_Year-1)
Var _start =(_YearNew&_weeknew)+0
Var _end = _selweek+0
return  CALCULATE(DIVIDE(SUM(Sheet1[Numerator])*1.0,[Denom]),all(Sheet1[Fiscal Week]),FILTER(all(Sheet1[Fiscal Week]),Sheet1[Fiscal Week]>_start && Sheet1[Fiscal Week]<_end))

 

 

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Anonymous
Not applicable

 Hi @Sami -  Its not working, getting single column

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors