The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
Hello @PBICommunity ,
As the newbie I am, I just found out that conditional formatting based on dates is not a thing in PBi. I understood from other posts that creating a numeric representation of the days' difference is needed and then applying the conditional on this. I believe there should be a clever way of creating a general measure, something like:
SELECTEDCOLUMN() - TODAY().
To apply the conditional without creating a measure for each column. Am I right? Does someone know the right approach here?
I am looking to apply a conditional to the table below:
Something pretty easy in other platforms, but these don't have the functionality of PBI. Therefore will be great achiving this in Desktop:
(Looking for):
Again as usual,
Thanks in advance
Charlie
Solved! Go to Solution.
Hi @charlie_torres ,
According to your description and screenshots, it seems that there are multiple date fields. And you want to set different background colors for these date fields when different conditions are met. You can refer the following links to try to achieve your requirement.
1. Select those date fields and unpivot these selected fields
2. Apply conditional formatting in your visual base on your requirement
Apply conditional formatting in tables and matrixes
Conditional formatting on multiple columns
If the above ones can't help you, could you please provide some raw data in your tables (exclude sensitive data) with Text format and your expected result with backend logic and special examples? By the way, what kind of conditions are needed for different background colors? It would be helpful to find out the solution. You can refer the following links to share the required info:
How to provide sample data in the Power BI Forum
How to Get Your Question Answered Quickly
And It is better if you can share a simplified pbix file. You can refer the following link to upload the file to the community. Thank you.
How to upload PBI in Community
Best Regards
Hi @Anonymous
Your suggestion is right what I was looking for. The shared links have been of great help, not only for this problem but for many other solutions.
Thanks very much.
Regards
Charlie
Hi @charlie_torres ,
According to your description and screenshots, it seems that there are multiple date fields. And you want to set different background colors for these date fields when different conditions are met. You can refer the following links to try to achieve your requirement.
1. Select those date fields and unpivot these selected fields
2. Apply conditional formatting in your visual base on your requirement
Apply conditional formatting in tables and matrixes
Conditional formatting on multiple columns
If the above ones can't help you, could you please provide some raw data in your tables (exclude sensitive data) with Text format and your expected result with backend logic and special examples? By the way, what kind of conditions are needed for different background colors? It would be helpful to find out the solution. You can refer the following links to share the required info:
How to provide sample data in the Power BI Forum
How to Get Your Question Answered Quickly
And It is better if you can share a simplified pbix file. You can refer the following link to upload the file to the community. Thank you.
How to upload PBI in Community
Best Regards