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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
Rajeshs_WB
Regular Visitor

Automatically change the marker color of an area chart against monthly or yearly sales goals

How to to change the marker color of an area chart against monthly or yearly sales goals in Power BI?

3 REPLIES 3
v-heq-msft
Community Support
Community Support

Hi @Rajeshs_WB ,
Based on your description, I created this test data:

vheqmsft_0-1710836179889.png

Create two measures

SumByMonth = 
CALCULATE(
    SUM('Table'[Target]),
    ALLEXCEPT(
        'Table',
        'Table'[Month]
    )
)
SumByYear = 
CALCULATE(
    SUM('Table'[Target]),
    ALLEXCEPT(
        'Table',
        'Table'[Year]
    )
)

Create a area chart

vheqmsft_1-1710836278397.png

If you want to change the color of the legend based on the year or month, you can open Format->Markers->Colors

vheqmsft_6-1710836550535.png
Of course you can also use it with Line color

vheqmsft_8-1710836684697.png

 

Best regards,

Albert He

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

 

Rajeshs_WB_0-1711105040669.png

How to to change the marker color of an area chart against monthly or yearly sales goals Met or UnMet in Power BI?

lbendlin
Super User
Super User

Please provide sample data that covers your issue or question completely, in a usable format (not as a screenshot).

Do not include sensitive information or anything not related to the issue or question.

If you are unsure how to upload data please refer to https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-...

Please show the expected outcome based on the sample data you provided.

Want faster answers? https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447...

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

Check out the May 2024 Power BI update to learn about new features.