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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
airetamstorm
New Member

Combo Chart not Calculating Percentages based on X axis

The solution I found is not returning the intended value.  I need the stacked columns shown in the top / left graph with an added line as shown in the other graphs. 

 

When I update the chart type to a combo it takes %s' as a whole as opposed to each month equaling 100%

 

The solution on the bottom right gets closer but the formula is using SUM for the ID field when it needs to use count, (each unique value = 1) doing this causes an error. Charts, data and measure can be found below. v1.pngCalc1.png

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @airetamstorm ,

 

I think you just need to use count for the ID field in your formula.

MEASURE = 
VAR _count1 =
    CALCULATE (
        COUNT ( 'Table'[ID] ),
        FILTER (
            ALL ( 'Table' ),
            'Table'[Date].[Month] = MAX ( 'Table'[Date].[Month] )
                && 'Table'[Type] = MAX ( 'Table'[Type] )
        )
    )
VAR _count2 =
    CALCULATE (
        COUNT ( 'Table'[ID] ),
        FILTER (
            ALL ( 'Table' ),
            'Table'[Date].[Month] = MAX ( 'Table'[Date].[Month] )
        )
    )
RETURN
    DIVIDE ( _count1, _count2 )

vkaiyuemsft_0-1727920984903.png

If your Current Period does not refer to this, please clarify in a follow-up reply.

 

Best Regards,

Clara Gong

If there is any post helps, then please consider Accept it as the solution  to help the other members find it more quickly.

View solution in original post

1 REPLY 1
Anonymous
Not applicable

Hi @airetamstorm ,

 

I think you just need to use count for the ID field in your formula.

MEASURE = 
VAR _count1 =
    CALCULATE (
        COUNT ( 'Table'[ID] ),
        FILTER (
            ALL ( 'Table' ),
            'Table'[Date].[Month] = MAX ( 'Table'[Date].[Month] )
                && 'Table'[Type] = MAX ( 'Table'[Type] )
        )
    )
VAR _count2 =
    CALCULATE (
        COUNT ( 'Table'[ID] ),
        FILTER (
            ALL ( 'Table' ),
            'Table'[Date].[Month] = MAX ( 'Table'[Date].[Month] )
        )
    )
RETURN
    DIVIDE ( _count1, _count2 )

vkaiyuemsft_0-1727920984903.png

If your Current Period does not refer to this, please clarify in a follow-up reply.

 

Best Regards,

Clara Gong

If there is any post helps, then please consider Accept it as the solution  to help the other members find it more quickly.

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors