Forum Discussion

Tomburton2023's avatar
Tomburton2023
Frequent Visitor
2 years ago
Solved

Creating a calculated table with a slicer

Hi

I am relatively new to PowerBI and trying to work out how to achieve something. Essentially, I have two tables (the source data being two SP lists). The 'main records' table has an ID column which acts as the unique identifier for the record - see below for some sample 'dummy' data:

 

 

My 'child' table has records, where there can be one or many records which link to a single record in the 'main records' table via the ID/Title (this column is labelled as 'Title' in the child table - see below screenshot):

 

For example, the record from the 'main records' table with ID of 4 is linked to 2 records ('4' and '8' in the child table, via the ID-Title link.

 

I need to create a report so that I can show records from the 'main records' table, and have a slicer filter called 'Month', which I can use to filter the report so it only shows records that have at least one linked record from the child table that have that 'Month' value (see the third column in the child table).

 

I'm struggling to work out how to achieve this. I presume I need a third table (a calculated table?), but I can't work out what the expression should be to build this table. 

 

Any help/advice would be appreciated.

 

Thanks

Tom

 

  • Base on what I am understanding you want to see everything from the main table and just be able to filter on the Child table month column.  see notes below or provide and example of the output you trying to accomplish.

    1st make sure you have join the tables correctly.  ID to Tittle. 

    2nd on you Matrix/Table if you bring anything from your child table, like the total amount, the slicer should automatically work.  If you are only bringing all the items from main table and don’t plan on bringing in anything from child table. Then you probably need to change your table join from many to one, to both, then your month slicer will work.  

3 Replies

  • Base on what I am understanding you want to see everything from the main table and just be able to filter on the Child table month column.  see notes below or provide and example of the output you trying to accomplish.

    1st make sure you have join the tables correctly.  ID to Tittle. 

    2nd on you Matrix/Table if you bring anything from your child table, like the total amount, the slicer should automatically work.  If you are only bringing all the items from main table and don’t plan on bringing in anything from child table. Then you probably need to change your table join from many to one, to both, then your month slicer will work.  

    • Tomburton2023's avatar
      Tomburton2023
      Frequent Visitor
      Hi Bmejia Many thanks for your advice - this worked perfectly 🙂 Cheers, Tom
  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi Tomburton2023 ,

    Did the above suggestions help with your scenario? if that is the case, you can consider Kudo or Accept the helpful suggestions to help others who faced similar requirements.

    If these also don't help, please share more detailed information and description to help us clarify your scenario to test.

    How to Get Your Question Answered Quickly 

    Regards,

    Xiaoxin Sheng