Forum Discussion

cm99's avatar
cm99
New Member
5 years ago
Solved

filtering

I have a set of data which I want to filter by month, so it shows a snapshot for the month for entities however shows the latest grading. So all entities for April 2021 however latest grading which could have been in April 2020.  so in the image below if i filter on March 21 table on left then I want entity A and the latest grading of Good from table on the right to show in the dashboard. 

 

  • Hi cm99 ,

     

    Create a measure as below:

    Measure = 
    var _entity=CALCULATE(MAX('Table1'[Entity]),FILTER('Table1','Table1'[Month]=SELECTEDVALUE(Table1[Month])))
    Return
    IF(MAX('Table2'[Entity])=_entity,1,0)

    Then put the measure in the filter pane and select is 1:

    And you will see:

    For the related .pbix file,pls see attached.

     

    Best Regards,
    Kelly

    Did I answer your question? Mark my post as a solution!

1 Reply

  • v-kelly-msft's avatar
    v-kelly-msft
    Community Support

    Hi cm99 ,

     

    Create a measure as below:

    Measure = 
    var _entity=CALCULATE(MAX('Table1'[Entity]),FILTER('Table1','Table1'[Month]=SELECTEDVALUE(Table1[Month])))
    Return
    IF(MAX('Table2'[Entity])=_entity,1,0)

    Then put the measure in the filter pane and select is 1:

    And you will see:

    For the related .pbix file,pls see attached.

     

    Best Regards,
    Kelly

    Did I answer your question? Mark my post as a solution!