Forum Discussion
Show data between 2 Date Filters
- 4 years ago
Hi Shadowestien ,
Delete the relationship between the tables, and then try the following formula to put the value of measure into the filter on this visual to show the result as 1.
If the problem is still not resolved, please point it out or provide test pbix file. Looking forward to your reply.
Best Regards,
Henry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi Shadowestien ,
Try a formula similar to the following, select the date values in each of the two slicers and filter out the corresponding values that meet the specified date.
M =
VAR a =
SELECTEDVALUE ( slicer[Start] )
VAR b =
SELECTEDVALUE ( slicer[End] )
RETURN
CALCULATE (
MAX ( 'Table_'[Value] ),
FILTER (
ALL ( Table_ ),
MAX ( 'Table'[Date] ) <= b
&& MAX ( 'Table_'[Value] ) >= a
)
)
If the problem is still not resolved, are you able to provide some test data (remove sensitive information) to facilitate me to answer for you as soon as possible. Looking forward to your feedback.
Best Regards,
Henry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- Shadowestien4 years agoFrequent Visitor
Hi, thank you so much for your answer it seems it can be what I need.
But I don't have full Knowledge about PowerBI, could you explain me how can I do this.
I mean I don't know what are the "reference name" of the filters, and this function where do I have to apply it?Thanks again btw.
- v-henryk-mstf4 years agoCommunity Support
Hi Shadowestien ,
Is your question confused about how to create formulas? Then type in the formula you want to try and save it. Put it into the corresponding table visual to display the corresponding results.
If there is still confusion, you can provide a sample pbix file and I will answer it for you as soon as possible.
Best Regards,
Henry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.- Shadowestien4 years agoFrequent Visitor
Hi, I updated my project and now I got 4 slicers "Start_Month" "Start_Year" "Last_ Month" "Last_Year.
On the table where I show the data I have the column "Termini" that's column I need filtering with the DateBetween.
I did this new measure (Mesures_PdG[Termini] is the column I want to filter 😞FiltreTermini = VAR year1 = SELECTEDVALUE ( Anys[Any] ) VAR year2 = SELECTEDVALUE ( Anys[Any2] ) VAR month1 = SELECTEDVALUE ( Mesos[Mes_Ordre] ) VAR month2 = SELECTEDVALUE ( Mesos[Mes_Ordre] ) VAR startDate = DATE(year1,month1,1) VAR finalDate = DATE(year2,month2,28) RETURN CALCULATE ( MAX ( Mesures_PdG[Termini] ), FILTER ( ALL ( Mesures_PdG ), MAX ( Mesures_PdG[Termini] ) <= finalDate && MAX ( Mesures_PdG[Termini] ) >= startDate ) )Do you think it's correct? Because I put this as a filter of the table and it doesn't work
Thank you for helping
- Anonymous4 years agoNot applicable
Hi, I'm having the same initial problem. My objective is show the data between two selected dates (start date and end date), both selected by different filters.
However, I could not implement this measure correctly. Could you share the .pbix file with this example?
Sorry for the English, I'm Brazilian. Thanks.