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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
cham
Post Patron
Post Patron

Slicer

Hi,

 

Once I select the date in slicer, I need to change the data in the table and pie chart which are not equal to that selected date and also I need to avoid the data from future dates.

 

When I select the specific date in slicer all my other charts need to show the data which are previous to that specific date. 

Ex- If we select 12/09/2018, I need to get 15/8/2018, 4/9/2018, 9/9/2018 data shown in my table and pie chart. (I dont want to capture the data from the date which I selected and the date which are in future.)

issue.PNG

 

 

1 ACCEPTED SOLUTION
Thim
Resolver V
Resolver V

So i can not find a "Smart" way to do this.

Maybe someone who understands M coding can, or there is a smart trick some where.

 

But here is a way you can do it.

 

You will need two filters, one for the date, and one for the date in an ascending index.

 

First use to RANKX

Here is my formula

Index = RANKX(
ALL(Table);
RANKX(ALL(Table);Table[Last Contact];;ASC)
)
This will make sure the latest date, has the lowest number.
 
First filter date as everything before. (In my case everything before 15-10-2015).
Then select everything and the remove the lowest number on the index. (This will remove the current day.)
 
As you can see i have all dates chosen from the first filter except the 15-10-2017, as this was index 17.
Last Contact.PNG

Hope this will help, but yea. not a nice looking way to do it.
 

View solution in original post

3 REPLIES 3
Thim
Resolver V
Resolver V

So i can not find a "Smart" way to do this.

Maybe someone who understands M coding can, or there is a smart trick some where.

 

But here is a way you can do it.

 

You will need two filters, one for the date, and one for the date in an ascending index.

 

First use to RANKX

Here is my formula

Index = RANKX(
ALL(Table);
RANKX(ALL(Table);Table[Last Contact];;ASC)
)
This will make sure the latest date, has the lowest number.
 
First filter date as everything before. (In my case everything before 15-10-2015).
Then select everything and the remove the lowest number on the index. (This will remove the current day.)
 
As you can see i have all dates chosen from the first filter except the 15-10-2017, as this was index 17.
Last Contact.PNG

Hope this will help, but yea. not a nice looking way to do it.
 

Thank you Thim. This is helful

AlB
Community Champion
Community Champion

Hi @Thim

Have you tried to modify the code that is generating the data for your chart as in:

 

CALCULATE (
    [Measure/code generating data for your chart];
    FILTER (
        ALL ( TableName[Last contact] );
        TableName[Last contact] <= MAX ( TableName[Last contact] )
    )
)

 

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

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
Top Kudoed Authors