Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago
Solved

Highlight table by slicer

Hi I have a power BI matrix table where i am showing cost center wise forecast and actuals. Now i've created a slicer based on cost center list. Now i want when i select a cost center from that slicer it would highlight that cost center in that table instead of filtering it from the entire table.

The DAX formulae i used is below 

 

Highlight =
VAR selectedpu =ALLSELECTED(PU_Lookup[Prod Unit Code])
return
IF(ISCROSSFILTERED(PU_Lookup[Prod Unit Code]),if(max('Regular TB'[Actuals]) IN selectedpu, 0, 1), 1)
after that when i used that measure to in conditional formatting it  gives me following error
"Mdxscript(Model) (31,80) calculate error in measure (table_name[Highlight]: function 'CONTAINSROW' does not support comparing values of type of text with type of numbers. Consider using the VALUE or FORMAT function to convert one of the values."
 
any idea what is going wrong?
  • You have a field type mismatch between [Prod Unit Code]  and [Actuals].  Please correct that.

2 Replies

  • You have a field type mismatch between [Prod Unit Code]  and [Actuals].  Please correct that.

  • v-xulin-mstf's avatar
    v-xulin-mstf
    Community Support

    Hi Anonymous

     

    Is your issue solved? If the issue has been solved, please adopt the solution to help others.

    The measure works well in my encironment, please change the data type according to the error message and check.

     

    If you still have some question, please don't hesitate to let me known.‌‌

     

    Best Regards,

    Link

     

    Is that the answer you're looking for? If this post helps, then please consider Accept it as the solution. Really appreciate!