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
ValentinHESS
New Member

Combine Line & column chart with Calculation Group

Hello everyone

 

I am currently trying to use for the first time the claculation group within my financial report.

I created a lot of calculation items 

ValentinHESS_0-1736618088315.png

But I have a problem when I want to create a line & column chart.

In fact I want to display in line both YTD and YTD N-1 and the variation in % on the column part such like this:

ValentinHESS_1-1736618227067.png

But I don't know how to use correctly the calculation group within the build section (below with measures)

ValentinHESS_2-1736618282956.png

 

Could you please help me with it ?

 

Thank you

 

Regards

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @ValentinHESS 

Based on your description, if you want to display the line & column chart, it is better that you create a new measure instead of using calculation group, you can try the following.

vxinruzhumsft_0-1736737497339.png

There is a calendar table, there is a 1:N reationship between the tables.

Calendar = CALENDAR(DATE(2024,1,1),DATE(2024,12,31))

vxinruzhumsft_1-1736737595775.png

Here is the sample measures i used.

Count = COUNTROWS('Table')
Sum = CALCULATE(SUM('Table'[Value]))

1.Create a new table to put the measure names to the table.

vxinruzhumsft_2-1736737722186.png

2.Create the following measures.

MTD =
IF (
    ISFILTERED ( 'Table (2)'[MeasureName] ),
    SWITCH (
        SELECTEDVALUE ( 'Table (2)'[MeasureName] ),
        "Count", CALCULATE ( [Count], DATESMTD ( 'Calendar'[Date] ) ),
        "Sum", CALCULATE ( [Sum], DATESMTD ( 'Calendar'[Date] ) )
    )
)
YTD =
IF (
    ISFILTERED ( 'Table (2)'[MeasureName] ),
    SWITCH (
        SELECTEDVALUE ( 'Table (2)'[MeasureName] ),
        "Count", CALCULATE ( [Count], DATESYTD ( 'Calendar'[Date] ) ),
        "Sum", CALCULATE ( [Sum], DATESYTD ( 'Calendar'[Date] ) )
    )
)

Then create the visual, and put the ytd and mtd measues to the visual.

vxinruzhumsft_3-1736737843797.png

Then create a slicer and put the measurename to the slicer.

vxinruzhumsft_4-1736737866862.png

 

Output

vxinruzhumsft_5-1736737878069.png

vxinruzhumsft_6-1736737886842.png

And there is another way, you can consider to use two visuals :line chart and column chart so that the calculation group can be put to the legend of the line chart visual.

vxinruzhumsft_7-1736738069616.png

 

Best Regards!

Yolo Zhu

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

1 REPLY 1
Anonymous
Not applicable

Hi @ValentinHESS 

Based on your description, if you want to display the line & column chart, it is better that you create a new measure instead of using calculation group, you can try the following.

vxinruzhumsft_0-1736737497339.png

There is a calendar table, there is a 1:N reationship between the tables.

Calendar = CALENDAR(DATE(2024,1,1),DATE(2024,12,31))

vxinruzhumsft_1-1736737595775.png

Here is the sample measures i used.

Count = COUNTROWS('Table')
Sum = CALCULATE(SUM('Table'[Value]))

1.Create a new table to put the measure names to the table.

vxinruzhumsft_2-1736737722186.png

2.Create the following measures.

MTD =
IF (
    ISFILTERED ( 'Table (2)'[MeasureName] ),
    SWITCH (
        SELECTEDVALUE ( 'Table (2)'[MeasureName] ),
        "Count", CALCULATE ( [Count], DATESMTD ( 'Calendar'[Date] ) ),
        "Sum", CALCULATE ( [Sum], DATESMTD ( 'Calendar'[Date] ) )
    )
)
YTD =
IF (
    ISFILTERED ( 'Table (2)'[MeasureName] ),
    SWITCH (
        SELECTEDVALUE ( 'Table (2)'[MeasureName] ),
        "Count", CALCULATE ( [Count], DATESYTD ( 'Calendar'[Date] ) ),
        "Sum", CALCULATE ( [Sum], DATESYTD ( 'Calendar'[Date] ) )
    )
)

Then create the visual, and put the ytd and mtd measues to the visual.

vxinruzhumsft_3-1736737843797.png

Then create a slicer and put the measurename to the slicer.

vxinruzhumsft_4-1736737866862.png

 

Output

vxinruzhumsft_5-1736737878069.png

vxinruzhumsft_6-1736737886842.png

And there is another way, you can consider to use two visuals :line chart and column chart so that the calculation group can be put to the legend of the line chart visual.

vxinruzhumsft_7-1736738069616.png

 

Best Regards!

Yolo Zhu

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

Helpful resources

Announcements
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!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

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