Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

Conditional formatting in True/False colulmn

i am trying to use check box in conditional formatting of a True/False column in a table. But when i am using conditional formatting then it is still showing the column as count and giving me percentages/vales for using in conditional formatting instead of True and False values although i have changed the type of column to True/False as well.

 

Please help as i want a check box(checked) for true value and checkbox(unchecked) for false value.

  • Anonymous's avatar
    Anonymous
    6 years ago

    Hi Anonymous ,

     

    I'd like to suggest you to create a measure like below then use it as based on field.

    Measure = IF(SELECTEDVALUE('Table'[Column1])=TRUE(),1,0)

     

    Best Regards,

    Jay

     

    Community Support Team _ Jay Wang

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

4 Replies

  • az38's avatar
    az38
    Icon for Community Champion rankCommunity Champion

    Anonymous 

    try to use Summarization First

  • Anonymous , You can create a color measure and use that in conditional formatting after choosing fields.

    Example

    Color sales = if(AVERAGE(Sales[Sales Amount])<170,"green","red")
    Color Year = if(FIRSTNONBLANK(Table[Year],2014) <=2016,"lightgreen",if(FIRSTNONBLANK(Table[Year],2014)>2018,"red","yellow"))

     

    refer for steps

    https://radacad.com/dax-and-conditional-formatting-better-together-find-the-biggest-and-smallest-numbers-in-the-column
    https://docs.microsoft.com/en-us/power-bi/desktop-conditional-table-formatting#color-by-color-values

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi Anonymous ,

     

    I'd like to suggest you to create a measure like below then use it as based on field.

    Measure = IF(SELECTEDVALUE('Table'[Column1])=TRUE(),1,0)

     

    Best Regards,

    Jay

     

    Community Support Team _ Jay Wang

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

    • MarkPalmberg's avatar
      MarkPalmberg
      Icon for Kudo Commander rankKudo Commander

      Is this *still* the only way to conditionally color a boolean value in a column? That seems pretty crazy. Obviously I have no idea what sort of technical debt is involved in being able to modify the Background color dialog to do something so advanced as "IF VALUE = TRUE THEN GREEN ELSE RED."