Forum Discussion

Azhar80's avatar
Azhar80
New Member
4 years ago

DAX with conditional formatting

Hi, I am using Power Automate Flow and filter column from Power BI report using 'Run a query against a dataset' and the Query Text is using SUMMARIZECOLUMNS. Example:

 

    SUMMARIZECOLUMNS(
      'table'[column1],
      'table'[column2],
      'table'[column3],
    )

Column3 value is in percentage, somehow, I need to make font color in [column3] red if the value below 75% and black if the value above 75%. it is possible to do it in Power BI Desktop (create measure and used it as conditional formatting > font color > using Field Value format style and so on). But, is there a way to do it in DAX query?

Thank you.

5 Replies

    • Azhar80's avatar
      Azhar80
      New Member

      Thanks for your response technolog , I have tried both but am still unable to do it correctly inside Power Automate > Run a query in a dataset. Anyway, again, thanks for your response.

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi Azhar80 

    If you want to set the font color , you always have to use conditional formatting. I created a sample , you can refer to it .

    Create a measure like this :

     

    Measure = SWITCH(TRUE(),SELECTEDVALUE('Table'[Column1])<0.75, "#DB271C")

     

     

    I have attached my pbix file .

     

    Best Regards,
    Community Support Team _ Ailsa Tao
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

    • Azhar80's avatar
      Azhar80
      New Member

      Thanks for your reply Anonymous , I do understand how to do it in Power BI report, but I actually want it only in DAX Query, to use it in my Power Automate flow, DAX Query - "Run a query in a dataset". Anyway, thanks for your help.

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi Azhar80

    Unfortunately, your need to set font color through automation cannot be achieved directly through DAX. You can post your thoughts on the Ideas forum . If a feedback is high voted there by other customers, it will be promising that Microsoft Product Team will take it into consideration when designing the next version in the future.

    Ideas (powerbi.com)

     

    Best Regards,
    Community Support Team _ Ailsa Tao
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.