Forum Discussion
Import Data valid for all years
- 1 year ago
Hi Mangnuel.,
The issue with filtering happens because your Calendar table filters by full dates, but your ExtendedTargets table currently only links by Year and Month. Since your Calendar has a unique Date for each day, Power BI can’t filter the ExtendedTargets correctly on just Year and Month.
To fix this, you need to create a full date column in your ExtendedTargets table—typically the first day of each target month and then create a relationship between that date and the Calendar’s Date column.
Add this calculated column to your ExtendedTargets table:
TargetDate = DATE(ExtendedTargets[Year], ExtendedTargets[Month], 1)Then in the model view, create a relationship between:
ExtendedTargets[TargetDate] and Calendar[Date]
Make sure this relationship is active and single-directional from Calendar to ExtendedTargets.
This way, filtering by any date, month, or year on the Calendar table will correctly filter the targets as well.
I hope my suggestions provided valuable insights. If you have any further questions, don’t hesitate to ask in a follow-up message.
If this post helped, please mark it as "Accept as Solution" so others can benefit as well.Best regards,
Sahasra.
Hi Mangnuel.,
The issue with filtering happens because your Calendar table filters by full dates, but your ExtendedTargets table currently only links by Year and Month. Since your Calendar has a unique Date for each day, Power BI can’t filter the ExtendedTargets correctly on just Year and Month.
To fix this, you need to create a full date column in your ExtendedTargets table—typically the first day of each target month and then create a relationship between that date and the Calendar’s Date column.
Add this calculated column to your ExtendedTargets table:
TargetDate = DATE(ExtendedTargets[Year], ExtendedTargets[Month], 1)
Then in the model view, create a relationship between:
ExtendedTargets[TargetDate] and Calendar[Date]
Make sure this relationship is active and single-directional from Calendar to ExtendedTargets.
This way, filtering by any date, month, or year on the Calendar table will correctly filter the targets as well.
I hope my suggestions provided valuable insights. If you have any further questions, don’t hesitate to ask in a follow-up message.
If this post helped, please mark it as "Accept as Solution" so others can benefit as well.
Best regards,
Sahasra.
Hi Mangnuel,
I wanted to check in your situation regarding the issue. Have you resolved it? If you have, please consider marking the reply as Accepted solution and give Kudos that helped you. It would be greatly appreciated by others in the community who may have the same question.
Thank you.
- v-sgandrathi1 year ago
Community Support
Hi Mangnuel,
May I ask if you have gotten this issue resolved?
If it is solved, please mark the helpful reply or share your solution and accept it as solution, it will be helpful for other members of the community who have similar problems as yours to solve it faster.
Thank you.
- Mangnuel1 year ago
Helper I
yes it works, wanted to check the system for a few days.
All the measures, filters and tables work.Thanks a lot