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 ,
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.
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
- v-henryk-mstf4 years agoCommunity Support
Hi Shadowestien ,
What does your data model look like and what are the inter-table relationships?
Best Regards,
Henry- Shadowestien4 years agoFrequent Visitor
I got 2 diferent tables for years and months and a relationship with the column on the main table.
- v-henryk-mstf4 years agoCommunity Support
Hi Shadowestien ,
According to your description, you want to filter the corresponding results in Measures_pdg by selecting the date range in Mesos and Anys?
Best Regards,
Henry