Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
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
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:
But I don't know how to use correctly the calculation group within the build section (below with measures)
Could you please help me with it ?
Thank you
Regards
Solved! Go to Solution.
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.
There is a calendar table, there is a 1:N reationship between the tables.
Calendar = CALENDAR(DATE(2024,1,1),DATE(2024,12,31))
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.
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.
Then create a slicer and put the measurename to the slicer.
Output
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.
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.
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.
There is a calendar table, there is a 1:N reationship between the tables.
Calendar = CALENDAR(DATE(2024,1,1),DATE(2024,12,31))
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.
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.
Then create a slicer and put the measurename to the slicer.
Output
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.
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.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.