Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Dears
I want to calculate Cumulative line chart. The requirement is as below:
Lets say there is 6 years of data (2021,2022,2023,2024,2025 and 2026(until today))
Dimension as "Month" and measure should show Current year + "Last all year data in Jan"
Scenario 1: Suppose I have 1000 records from Jan 2021 until Dec 2025, and Jan-2026 has 5 , Feb-2026 Have 9, Mar-2026 have 6 and so on.
So the expression should show :
Jan =1005
Feb =1014
Mar =1020
and so on.
Scenario 2: Suppose user selects last Year(2025) from the filter.
So the expression should be:
Jan 2025 as (Jan 2025 + All previous records until Dec 2024)
Feb 2025 as Feb 2025 + Jan 2025 + All previous records until Dec 2024
Best Regards
Shahzad
Hi try this
Dim :month
Measure:
Sum(
{
<
Year = {"<$(=Max(Year))"}
>
}
Amount
)
+
RangeSum(
Above(
Sum(
{
<
Year = {"$(=Max(Year))"}
>
}
Amount
),
0,
RowNo()
)
)
Hi try this
Dim :month
Measure:
Sum(
{
<
Year = {"<$(=Max(Year))"}
>
}
Amount
)
+
RangeSum(
Above(
Sum(
{
<
Year = {"$(=Max(Year))"}
>
}
Amount
),
0,
RowNo()
)
)
Hi
Many Thanks.
It worked with slight Change. I added "Total" for the past year expression.
Sum(total
{
<
Year = {"<$(=Max(Year))"}
>
}
Amount
)
+
RangeSum(
Above(
Sum(
{
<
Year = {"$(=Max(Year))"}
>
}
Amount
),
0,
RowNo()
)
)
BR
Shahzad
Glad it worked !