Forum Discussion

Mangnuel's avatar
Mangnuel
Icon for Helper I rankHelper I
1 year ago
Solved

Import Data valid for all years

Hi PowerBi-World,   I need your help, again 😊 I have a lots of Data and everything is filter by either the Date or the Asset Code. Goal ist to include a Target (expected Budget) for every mont...
  • v-sgandrathi's avatar
    v-sgandrathi
    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.