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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Dee
Helper III
Helper III

show months data seperately on a graph

explanation.pngHello world,

 

I am trying to achieve a combo chart that shows 

 

1. amount paid on time.

2.planned amount

3.late amount from previous months paid this month.

 

Ideally, I wanted a combo chart that would show the planned amount independently, and the on time and late stacked together, that's not possible in power bi unless I use the line and stacked chart.

 

That not being possible, is there a way I can maybe show for example.

May - Planned 100

May - On time 60

May - Late make up 50

 

A chart showing the three may value, and maybe I can try to reduce the spacing between them to be seen as independent and stacked. 

 

I am not sure If explained well and if there's a way to achieve this without using the line and combo chart. Any help would be highly appreciated.

 

I have uploaded the picture on top since powerbi only allows one month, can I have two months, and have one as an independent and the other one stacked.

 

Sorry for the poor pic explanation.

 

 link to pbix file 

 

TIA!

 

1 ACCEPTED SOLUTION
v-lid-msft
Community Support
Community Support

Hi @Dee ,

 

We can also use the axis table as a workaround:

 

1. create a calculated table and sort by rank column

Axis = 
UNION (
    CROSSJOIN (
        ADDCOLUMNS (
            SELECTCOLUMNS ( GENERATESERIES ( 1, 12, 1 ), "MonthNr", [Value] ),
            "Month", FORMAT ( DATE ( 2000, [MonthNr], 1 ), "MMM" ),
            "Rank", [MonthNr] * 2
        ),
        SELECTCOLUMNS ( { "On Time", "Late" }, "Legand", [Value] )
    ),
    CROSSJOIN (
        ADDCOLUMNS (
            SELECTCOLUMNS ( GENERATESERIES ( 1, 12, 1 ), "MonthNr", [Value] ),
            "Month", FORMAT ( DATE ( 2000, [MonthNr], 1 ), "MMM" ) & "-Planned",
            "Rank", [MonthNr] * 2 - 1
        ),
        SELECTCOLUMNS ( { "Planned" }, "Legand", [Value] )
    )
)

 

9.jpg

 

2. create a measure to show the value

 

Value = 
Var t = FILTER (
                ALLSELECTED ( 'export (2)' ),
                'export (2)'[Month]
                    IN SELECTCOLUMNS ( 'Axis', "Month", SUBSTITUTE ( [Month], "-Planned", BLANK () ) )
            )
return 
SUMX (
    DISTINCT ( 'Axis'[Legand] ),
    SWITCH (
        [Legand],
        "Late", CALCULATE (
            SUM ( 'export (2)'[late] ),
            t
        ),
        "on Time", CALCULATE (
            SUM ( 'export (2)'[On time t] ),
            t
        ),
        "Planned", CALCULATE (
            SUM ( 'export (2)'[Planned ] ),
            t
        )
    )
)

 

10.jpg


Best regards,

 

Community Support Team _ Dong Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

6 REPLIES 6
v-lid-msft
Community Support
Community Support

Hi @Dee ,

 

How about the result after you follow the suggestions mentioned in my original post?Could you please provide more details about it If it doesn't meet your requirement?


Best regards,

 

Community Support Team _ Dong Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
v-lid-msft
Community Support
Community Support

Hi @Dee ,

 

We can also use the axis table as a workaround:

 

1. create a calculated table and sort by rank column

Axis = 
UNION (
    CROSSJOIN (
        ADDCOLUMNS (
            SELECTCOLUMNS ( GENERATESERIES ( 1, 12, 1 ), "MonthNr", [Value] ),
            "Month", FORMAT ( DATE ( 2000, [MonthNr], 1 ), "MMM" ),
            "Rank", [MonthNr] * 2
        ),
        SELECTCOLUMNS ( { "On Time", "Late" }, "Legand", [Value] )
    ),
    CROSSJOIN (
        ADDCOLUMNS (
            SELECTCOLUMNS ( GENERATESERIES ( 1, 12, 1 ), "MonthNr", [Value] ),
            "Month", FORMAT ( DATE ( 2000, [MonthNr], 1 ), "MMM" ) & "-Planned",
            "Rank", [MonthNr] * 2 - 1
        ),
        SELECTCOLUMNS ( { "Planned" }, "Legand", [Value] )
    )
)

 

9.jpg

 

2. create a measure to show the value

 

Value = 
Var t = FILTER (
                ALLSELECTED ( 'export (2)' ),
                'export (2)'[Month]
                    IN SELECTCOLUMNS ( 'Axis', "Month", SUBSTITUTE ( [Month], "-Planned", BLANK () ) )
            )
return 
SUMX (
    DISTINCT ( 'Axis'[Legand] ),
    SWITCH (
        [Legand],
        "Late", CALCULATE (
            SUM ( 'export (2)'[late] ),
            t
        ),
        "on Time", CALCULATE (
            SUM ( 'export (2)'[On time t] ),
            t
        ),
        "Planned", CALCULATE (
            SUM ( 'export (2)'[Planned ] ),
            t
        )
    )
)

 

10.jpg


Best regards,

 

Community Support Team _ Dong Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Thank you so much for this!!

TomMartens
Super User
Super User

Hey @Dee ,

 

I have to admit that I do not fully understand what the visual should look like.

Please prepare a simple drawing and attach an image.

It is also very helpful if you provide sample data, upload the pbix that contains the sample data (it should also represent your data model) to onedrive or dropbox and then share the link.

But you can check the bullet chart from OKviz available from the market place.

 

Regards,

Tom



Did I answer your question? Mark my post as a solution, this will help others!

Proud to be a Super User!
I accept Kudos 😉
Hamburg, Germany

@TomMartens  I have updated the post, uploaded the pic and the pbix link.

 

Am trying to see if there's a way I can add maybe two months so that one is independent -Planned and the other two late and on time as stacked, so two months same data.

Hey,

from my experience this is currently not possible using the default visuals or one of the existing custom visuals.

But from my experience this should be doable using one http://charticulator.com/

You might also look to powerbi.tips as they adopted charticulator and provide a different version of charticulator.

It's easy to export a pbiviz file from charticulator.

Hopefully this provides some new ideas that will help to tackle this challenge.

Regards,
Tom


Did I answer your question? Mark my post as a solution, this will help others!

Proud to be a Super User!
I accept Kudos 😉
Hamburg, Germany

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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