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
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
v-shex-msft
Community Support
Community Support

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

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.
Anonymous
Not applicable

Hi @v-shex-msft , 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

Hi @Santosh_kumar,

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

Best Regards,

Jack Chen

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.
Anonymous
Not applicable

HI @v-shex-msft,

 

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))

 

 

Anonymous
Not applicable

 Hi @Sami -  Its not working, getting single column

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