Forum Discussion

sea's avatar
sea
Frequent Visitor
8 years ago

the year filter doesn't work

Hello,

 

I have these tables, the tables are demo:

 

InPower BI I have the following structure:

Year Slicer has the date filed from the table activities

User Id Slicer has the id_user field from the table user

For the total target Card I wrote the following measure:

total target =
(VALUES('table target activities'[taget activities])*VALUES('table target activities'[weeks worked this year]))+
(VALUES('table target activities'[taget activities])*VALUES('table target activities'[weeks worked last year]))+
(VALUES('table target activities'[taget activities])*VALUES('table target activities'[weeks worked over the past two years]))

Card total activities has the count id_user field from the table activities

For the total deficit Card I wrote the following measure:

[target total] - COUNT ("table target activities" [id_user])

 

If a change id_user it works, when I select a single year, only Total activities work correctly, the rest remains unchanged.
How can I make all the Cards work correctly when choosing the years?

 

Thank you!

3 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    You need to change the relationship from single direction for both

     

    Go to Relationship tab -> double click on relation and set the direction of relationship in both

     

    Regards

    • sea's avatar
      sea
      Frequent Visitor

      Not work, because when I choose:

      id_user -> 30 and year 2018, total target does not change depending on the selected year.

      Total target for 2018 for id_user 30 is 60 not 1100

      • v-huizhn-msft's avatar
        v-huizhn-msft
        Microsoft Employee

        Hi sea,

        If there are relationships between  table 'activities' and table 'target activities', table 'user' and 'target activities'? And please confirm the two slicers affect the card by Edit interactions under format. 

        Best Regards,
        Angelia