Forum Discussion

Grayfox88's avatar
Grayfox88
New Member
6 years ago
Solved

Filtering based on 2 values.

I am looking to filter my budget table based 2 values. Id like to filter each month as well as always display the “Monthly” items.  I’m not sure how best to go about this. I have tried disconnected s...
  • v-lid-msft's avatar
    v-lid-msft
    6 years ago

    Hi Grayfox88 ,

     

    We can create a measure and use it in visual filter to meet your requirement:

     

    Measure = var t = FILTER(ALLSELECTED('Budget'), 'Budget'[Start Date].[Year] = YEAR(SELECTEDVALUE('Budget'[Start Date])) && 'Budget'[Start Date].[MonthNo] = MONTH(SELECTEDVALUE('Budget'[Start Date]) ))
    return 
    IF(COUNTROWS(FILTER(t,'Budget'[Budget Type]<>"Monthly"))+0 = 0 && COUNTROWS('Budget') <> 0  ,1,-1)

     

     

     

     


    If it doesn't meet your requirement, Please show the exact expected result based on the Tables that you have shared.


    Best regards,