Forum Discussion

justnoob08's avatar
justnoob08
Frequent Visitor
5 years ago

Exclude Month on Measure calculation based on Slicer and Boolean

Hi, I have a matrix table showing the months and is connected to date table.

 

I have a measure that computes the score of a user and at times I need to exclude "waive" a month or 2 from the computation.

I have a separate table with the User names, waive status, monthnomber to use as reference for my calculation.

 

MyUser  IsWaivedMonthNo
User1TRUE4
User2TRUE4
User3TRUE4
User1TRUE3

 

I used 2 other measure for the lookup

Auditor = Lookupvalue('Waived'[isWaived], 'Waived'[MyUser], SelectedValue ('MainUsersDB'[Name])

WaivedMonth =Lookupvalue('Waived'[MonthNo], 'Waived'[MyUser], SelectedValue ('MainUsersDB'[Name])

 

I have below initial If for exclusion, It works fine if the exclusion is for 1 month (User2 and User3) I can't figure out how if there are 2 months that I need to exclude. Thank you for the help!

Score = IF([Auditor]=TRUE() && SELECTEDVALUE('Calendar'[Date].[MonthNo])=[WaivedMonth],"Waived",...)

3 Replies

    • justnoob08's avatar
      justnoob08
      Frequent Visitor

      Hi amitchandak. It's throwing an error that multiple values was supplied where a single value was expected when I filter "User1" since it returns 2 values "4" and "3" when I used the lookup and assigned it to the measure [WaivedMonth], I would like to achieve below.

      Slicer selected: User1

       

      Matrix

      Date    Score

      January    5

      February   3

      March   Waived
      April   Waived

       

       

      Hope this is clear, thank you for responding.