Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
Azhar80
New Member

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 5
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.

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")

 

 

Ailsamsft_0-1662014491075.png

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.

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.

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.

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.