Forum Discussion

Evelin_'s avatar
Evelin_
Helper I
1 year ago
Solved

Conditional formatting - gradient is not allowed

Hello,

 

Normally I know how to add consitional formatting to my visualizations/tables, but I have a case where I do not have any idea, and the known ways are not working with this type of measures. I have a DAX which has a type where conditional formatting is not allowed to use. Is there any idea how to add gradient formatting in the table?  Please see below that the gradient formatting is not possible, and see the dax exactly.  Thank you for the answers in advance!

 

 

  • Anonymous's avatar
    Anonymous
    1 year ago

    Hi Evelin_ ,

    Based on your description and screenshots, it appears that you are attempting to configure conditional formatting with a gradient type, but the measure [NSR Actual_vs_Target_Display CPL] cannot be selected. Upon reviewing the second screenshot, it is evident that the data type of the measure is Text, which is causing the issue. Conditional formatting with gradients typically requires the measure to be numeric. To resolve this, consider creating a new measure that explicitly casts the value to a numeric type.

    Best Regards

3 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi Evelin_ ,

    Based on your description and screenshots, it appears that you are attempting to configure conditional formatting with a gradient type, but the measure [NSR Actual_vs_Target_Display CPL] cannot be selected. Upon reviewing the second screenshot, it is evident that the data type of the measure is Text, which is causing the issue. Conditional formatting with gradients typically requires the measure to be numeric. To resolve this, consider creating a new measure that explicitly casts the value to a numeric type.

    Best Regards

    • Evelin_'s avatar
      Evelin_
      Helper I

      Thank you very much! I did not realize that this is the problem. On theother hand I tries to replace the format with other codes, but I dont know how can remain the same dax but with numeric formatting. Can you suggest how to edit this dax? 

      Thank you!

      Evelin

      • Anonymous's avatar
        Anonymous
        Not applicable

        Hi Evelin_ ,

        What's your final expected result? Are you trying to create a table visual and configure conditional formatting for it?  Could you provide some sample data to explain it? It would be helpful to find out the solution. You can refer the following link to share the required info:

        How to provide sample data in the Power BI Forum

        Best Regards