Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register 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.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
145 | |
79 | |
64 | |
52 | |
47 |
User | Count |
---|---|
216 | |
89 | |
76 | |
67 | |
60 |