Forum Discussion

dansimmons's avatar
dansimmons
Frequent Visitor
4 years ago

Pulling comments from 'Comments' table based on slicer selections

Hi,

 

I'm trying to add comments to my dashboard which will pull from a 'Comments' table that I have created. This table contains the following columns:

 

- Month

- Territory

- KPI

- Value (i.e. the comment itself)

 

Within my report, I have slicers applied for 'Month', 'Territory' and 'KPI'. The idea is that, based on the selections in these slicers, the associated 'Value' entry will pull through accordingly.

 

I believe the first step is to create the correct connections within the data model, which I'm struggling with. I think some DAX may then be required, but ultimately I simply wish to display the contents of the 'Value' field from the 'Comments' table based on the matching slicer selections.

 

For example, if I had slicers selected as 'UK', 'SLG' and '01/04/2022' (for 'Territory', 'KPI' and 'Month' respectively) in line with the below data from the 'Comments' table, I'd want to display the 'Value' entry (i.e. '0' in this case - bad example I know!) in the visual.

 

 

Model as follows:

 

 

Thanks ðŸ™‚

1 Reply

  • dansimmons , Using Month You should create a date

    say you have month like Jan-2022

    Date = datevalue("01-" &[Month])

    or

    Date = ("01-" &[Month]) // change data type to date

     

    Or create date by using month

     

    You need to have a common dimension to Territory and  KPI

     

    example

    Territory= distinct(Union(distinct(KPITable[Territory]), distinct(comments[Territory])) )

     

    KPI= distinct(Union(distinct(KPITable[KPI]), distinct(comments[KPI])) )

     

     

    Join these with both table and use common filters now