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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
Karthik12
Helper V
Helper V

Skip Sunday in last day production report

Hello Team,

Every monday I am facing an issue with my production report as it shows "blank" in all fields since I have added page filter as "in the last 1 day". Since last 1 day is sunday, It shows like this.

 

May I know how to skip sunday and shows last production day i,e Saturday report ? Can anyone support me to solve this?

1 ACCEPTED SOLUTION
v-yangliu-msft
Community Support
Community Support

Hi  @Karthik12 ,

I created some data:

vyangliumsft_0-1666941561599.png

Here are the steps you can follow:

1. Create measure.

Flag =
var _maxxdate=MAXX(ALL('Table'),[Date])
return
IF(
WEEKDAY(_maxxdate,2)=7&&MAX('Table'[Date])=_maxxdate-1,1,
IF(
    WEEKDAY(_maxxdate,2)<>7&&MAX('Table'[Date])=_maxxdate,1,0))

2. Place [Flag]in Filters, set is=1, apply filter.

vyangliumsft_1-1666941561603.png

3. Result:

vyangliumsft_2-1666941561604.png

 

Best Regards,

Liu Yang

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

3 REPLIES 3
v-yangliu-msft
Community Support
Community Support

Hi  @Karthik12 ,

I created some data:

vyangliumsft_0-1666941561599.png

Here are the steps you can follow:

1. Create measure.

Flag =
var _maxxdate=MAXX(ALL('Table'),[Date])
return
IF(
WEEKDAY(_maxxdate,2)=7&&MAX('Table'[Date])=_maxxdate-1,1,
IF(
    WEEKDAY(_maxxdate,2)<>7&&MAX('Table'[Date])=_maxxdate,1,0))

2. Place [Flag]in Filters, set is=1, apply filter.

vyangliumsft_1-1666941561603.png

3. Result:

vyangliumsft_2-1666941561604.png

 

Best Regards,

Liu Yang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

amitchandak
Super User
Super User

@Karthik12 , Create a column in your date table

 

Switch(

[Date] = Today()-1 && weekday(Today()-1,1) <> 1, 1,

[Date] = Today()-2 && weekday(Today()-1,1) = 1,1 ,

0)

 

Ise as page level filter and filter for value =1

@amitchandak Thanks for your time to suport me.

I have done. It looks some issue (please refer the attached screenshot)

 

Thanks !

Sunday skip.png

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

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.