Forum Discussion
Conditional Formatting
Hi,
Seems like the formatting is not working as expected and need your inputs.
Sample Data format for last months.
Based on the above data, I wanted to display sales per store for the last N months and highlight with a color if there is a drop/increase in the qty for each mont based on ..
If current-previous month >0 then "Green" color Ex: 4092 > 1506
If current-previous month <0 then "Red" color Ex: 1623 < 4092
IF current-previous month =0 then "Black" color Ex: 999=999(not in data)
Created the dashboard for the last 6 months and applied conditonal formating.
However When I adjust the slicer value—for example, to “Last 5 months”—the formatting no longer applied as intended. Expected 3010 as red color but showing as green.
Expected Output:
When I choose last 4 months the output shown as : but expected output is 1506 and 4067 numbers should be in red color.
Output:
Link for data and pbix file:
Hi,
PBI file attached.
Hope this helps.
11 Replies
- v-sgandrathi
Community Support
Hi vasubabu,
I wanted to check if you had the opportunity to review the information provided by super users alish_b Ashish_Mathur Irwan and danextian. Please feel free to contact us if you have any further questions
Thank you and continue using Microsoft Fabric Community Forum..- v-sgandrathi
Community Support
Hi vasubabu,
We wanted to follow up since we haven't heard back from you regarding our last response. We hope your issue has been resolved.
Thank you for being a valued member of the Microsoft Fabric Community Forum!
- v-sgandrathi
Community Support
Hi vasubabu,
I wanted to check in your situation regarding the issue. Have you resolved it?
Should you have any further questions, feel free to reach out.
Thank you for being a part of the Microsoft Fabric Community Forum.
- Irwan
Super User
hello vasubabu
i am not sure how your data looks like but it seems to me the conditional formating only for values.
There is no conditional formating for date therefor changing date slicer will not have any effect on conditional formating.
otherwise, please share your sample data that represent your original data (remove any confidential information) including with your expected/desired result.
you can upload your pbix in online storage like dropbox, etc.
Thank you.
- Ashish_Mathur
Super User
Hi,
Please explain your requirement in simple langage. Share the download link of the PBI file. Show the expected result there.
- danextian
Super User
Hi vasubabu
The relative date slicer is based on the current system date, not the last date in your semantic model. Also, I noticed you're using my usual sample file - I'm curious what changes you made, since your conditional formatting isn't working. Did you make sure the Dates table is has been marked as such? Also, when debugging it is best to show the measures involve and not just the measure the conditional formatting is applied to so you or people will know which one could be causing the problem.
- vasubabuFrequent Visitor
danextian , Ashish_Mathur , Irwan Updated the inital post as per the sample dataset and also attached the pbix file. Pls check.
- Ashish_Mathur
Super User
Hi,
If you drag the previous month measure to your visual, you will see that there is no figure for 03/2025 (because you have chosen to show only the pat 5 months). Since 3010 > 0, it appears in green. That seems OK.
- vasubabuFrequent Visitor
Hi Ashish_Mathur Technically that is correct but my usecase is to consider immediate previous month(if available in db) though the month is not part of date slicer or not displaying in the chart. Please let me know if there is any work around.
If this is not possible, then can u let me know in displaying the last N months(lowest month) only in black color rather than green color.. As 3010>0.