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

Shape the future of the Fabric Community! Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions. Take survey.

Reply
Anonymous
Not applicable

Filter table for selected Date but next year

Hello all

 

I have a report, looking like that:

1.png

The tables contain the same columns. The right one is not filtered by the two slicers. 

My goal is, when i select a [From] and a [Till] date in the slicer, the right table should filter by these dates but from next year. so in this example, 01.06.2019 till 31.05.2020

 

I tried it with measures to get the selected date, make this date the same but next year (even struggeling with leap years) and using an if that looks the [From] date with the [From_nextYear] but as this is built from the [From] field its in a loop i think...

 

Side note, [From] Date is always the first, [Till] Date always the last day of each month.

 

Any ideas?

1 ACCEPTED SOLUTION

@Anonymous  i do not think you can use selected value in this context, you can grab the value from selected value but as soon as you use it to filter another table, it seems to set the filter context to blank.  I dont think ive ever tried as hard to solve an issue because it has me baffled but i think its the filter context of selected value is not propagated outside of the table it belongs to.

 

 





If I took the time to answer your question and I came up with a solution, please mark my post as a solution and /or give kudos freely for the effort 🙂 Thank you!

Proud to be a Super User!




View solution in original post

9 REPLIES 9
vanessafvg
Super User
Super User

@Anonymous 

 

not quite sure what you asking,

where do you want the measure?  are your slicers correct

 

so you want to create a measure in the right column?  can you share your file or code?





If I took the time to answer your question and I came up with a solution, please mark my post as a solution and /or give kudos freely for the effort 🙂 Thank you!

Proud to be a Super User!




Anonymous
Not applicable

Would like to only create an example file unless i really have to..

What i was talking about my measures and tries, never mind, was only to show my thoughts on this.

 

Yes, i want a measure for my right table to filter the dates according to the slicers in the left half.

Selected [From] in slicer: 01.06.2018

Selected [Till] in slicer: 31.05.2019

 

Right table should only show entries where [From] = 01.06.2019 and [Till] = 31.05.2020

 

Does this help a little?

Anonymous
Not applicable

Hi @vanessafvg 

i now tried another way. Duplicated my orderlines table. in the duplicate i make an the following if:

FromIsNextPeriod = IF('ssbi Orderlines_dupe'[From].[Date] = [SelectedFrom_NextYear];"true";"false")

Weired thing is, in the table the two values are the same, but the if says "false":

1.png

 

How is this possible? Both have date format, tables are not connected to each other.

can you paste the data into the screen @Anonymous  

 

then i can try and play with it obviously its not seeing it as the same but i dont know why.





If I took the time to answer your question and I came up with a solution, please mark my post as a solution and /or give kudos freely for the effort 🙂 Thank you!

Proud to be a Super User!




Anonymous
Not applicable

@vanessafvg  i created an example file: https://drive.google.com/file/d/1pcSDMLJe14DCYdZYWgCXeL8MfYCdI25h/view?usp=sharing

 

There is also an "expected" tab where you see my wanted result.

 

Let me know if you need any further infos.

 

Many thanks

Anonymous
Not applicable

Hi @vanessafvg 

 

Is there a reason that your answer was deleted?

Did not get it to work with your answer..

@Anonymous  i do not think you can use selected value in this context, you can grab the value from selected value but as soon as you use it to filter another table, it seems to set the filter context to blank.  I dont think ive ever tried as hard to solve an issue because it has me baffled but i think its the filter context of selected value is not propagated outside of the table it belongs to.

 

 





If I took the time to answer your question and I came up with a solution, please mark my post as a solution and /or give kudos freely for the effort 🙂 Thank you!

Proud to be a Super User!




Anonymous
Not applicable

@vanessafvg 

 

Well, altough thats unfortunate i thank you so much for your assistence. 

 

Best regards

@Anonymous   hi yes, i realised there was something wrong with my solution, ive done a lot of digging with this and i can't quite figure out the issue but will get back to you today





If I took the time to answer your question and I came up with a solution, please mark my post as a solution and /or give kudos freely for the effort 🙂 Thank you!

Proud to be a Super User!




Helpful resources

Announcements
November Carousel

Fabric Community Update - November 2024

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

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.