The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
I'm creating a bar graph with dates on the X-axis,
and I recently asked if it's possible to color the dates that are Sundays.
Thank you in advance.
Solved! Go to Solution.
Hi @yyjp
Thank you for reaching out microsoft fabric community forum.
No, Power BI does not currently support custom formatting of individual axis labels.You can submit your idea in the ideas forum. If your idea receives enough votes, Microsoft may consider it in the future.
Raise your idea here:Fabric Ideas - Microsoft Fabric Community
Thank you.
@yyjp ,
You can created a calculated column as
result=if([column]=Sunday,"Geen","Blue")
Then go to format panel and expand columns option and apply this logic in color.
Regards,
Surya.
Thank you very much.
Maybe my question was unclear,
I would like to color the dates on the axis,
not the data,
is this possible?
Thank you.
Hi @yyjp
Thank you for reaching out microsoft fabric community forum.
No, Power BI does not currently support custom formatting of individual axis labels.You can submit your idea in the ideas forum. If your idea receives enough votes, Microsoft may consider it in the future.
Raise your idea here:Fabric Ideas - Microsoft Fabric Community
Thank you.
Thank you very much.
I tried doing it as you instructed, but it seems I can't.
> Add this custom column to your bar graph. This will allow you to use it for conditional formatting.
Where should I add this?
> In the "Based on field" dropdown, select the custom column you created (IsSunday).
> Set the color for "Sunday" and "Other" as desired.
Since there were no subsequent conditions in "based on the field"
I proceeded with "the rules"
Because the "field to be used as a standard" becomes the "initial"
coloring is not possible only on Sundays.
Thank you.
@yyjp Create a Custom Column: First, create a custom column in your data model to identify Sundays. You can use DAX to create this column.
IsSunday = IF(WEEKDAY([Date], 2) = 7, "Sunday", "Other")
Add this custom column to your bar graph. This will allow you to use it for conditional formatting.
Select the bar chart visual.
Go to the "Format" pane.
Expand the "Data colors" section.
Click on the "fx" button next to "Default color".
In the "Based on field" dropdown, select the custom column you created (IsSunday).
Set the color for "Sunday" and "Other" as desired.
Proud to be a Super User! |
|