Forum Discussion
Anonymous
2 years agoNot applicable
help with roll up line chart
Hi,
Using these two functions I did calcolated running totals daily and monthly and filter for weekly but when plot them in a line chart, the month turns into days when choosing days for X axis, How can i plot them in a line chart and lines remain monthly and daily each:
RolleUp Month =
VAR Period =
DATESINPERIOD(
'Date'[Date],
MAX('Date'[Date]),
-12,
MONTH
)
VAR totalSales =
CALCULATE(
[Total Sales],
Period
)
RETURN
totalSales
RolleUp Day =
VAR Period =
DATESINPERIOD(
'Date'[Date],
MAX('Date'[Date]),
-365,
DAY
)
VAR TotalSales =
CALCULATE(
[Total Sales],
Period
)
RETURN
TotalSales
Hi Anonymous , could you try this measure see if it fits on your requirements.
RolledUp Month = VAR Period = DATESINPERIOD('Date'[Date], MAX('Date'[Date]), -12, MONTH) VAR TotalSales = CALCULATE([Total Sales], Period) RETURN TotalSales RolledUp Day = VAR Period = DATESINPERIOD('Date'[Date], MAX('Date'[Date]), -365, DAY) VAR TotalSales = CALCULATE([Total Sales], Period) RETURN TotalSales
1 Reply
- ronaldbalza2023
Continued Contributor
Hi Anonymous , could you try this measure see if it fits on your requirements.
RolledUp Month = VAR Period = DATESINPERIOD('Date'[Date], MAX('Date'[Date]), -12, MONTH) VAR TotalSales = CALCULATE([Total Sales], Period) RETURN TotalSales RolledUp Day = VAR Period = DATESINPERIOD('Date'[Date], MAX('Date'[Date]), -365, DAY) VAR TotalSales = CALCULATE([Total Sales], Period) RETURN TotalSales