Hello sir , try with same dax function but getting error like The expression refers to multiple columns. Multiple columns cannot be converted to a scalar value. following is the dax function MTD_YTD_QTD_Selection = VAR TODAYDATE = TODAY() VAR YearStart = CALCULATE(STARTOFYEAR(SalesTimeline[Date]), YEAR(SalesTimeline[Date]) = YEAR(TODAYDATE)) VAR MonthStart = CALCULATE(STARTOFMONTH(SalesTimeline[Date]), YEAR(SalesTimeline[Date]) = YEAR(TODAYDATE), MONTH(SalesTimeline[Date]) = MONTH(TODAYDATE)) VAR Result = UNION( ADDCOLUMNS(CALENDAR(YearStart, TODAYDATE), "Selection", "YTD"), ADDCOLUMNS(CALENDAR(MonthStart, TODAYDATE), "Selection", "MTD") ) RETURN Result please help me to resolve error
Hi Sir, thank you for your sharing. The method is really simple and clear. However, this slicer seems doesn't work on visuals that contains last year's data. I have a clustered column chart that contains this year and last year's column. When I click the slicer, it works perfect with this year's column, but last year's column just disappear. Do you have any suggestion to fix the problem? thank you very much
You can use a measure to show last year data along with current year. In last year calculation you can ignore current MTD/YTD filter or you can filter it based on month and year only.
can we use
YTD & MTD function directly instead of startmonth & year function !
hello, which visual did you drag the selection dax measure to?
Whatta amazing explanation.
Hello sir ,
try with same dax function but getting error like
The expression refers to multiple columns. Multiple columns cannot be converted to a scalar value.
following is the dax function
MTD_YTD_QTD_Selection =
VAR TODAYDATE = TODAY()
VAR YearStart = CALCULATE(STARTOFYEAR(SalesTimeline[Date]), YEAR(SalesTimeline[Date]) = YEAR(TODAYDATE))
VAR MonthStart = CALCULATE(STARTOFMONTH(SalesTimeline[Date]), YEAR(SalesTimeline[Date]) = YEAR(TODAYDATE), MONTH(SalesTimeline[Date]) = MONTH(TODAYDATE))
VAR Result =
UNION(
ADDCOLUMNS(CALENDAR(YearStart, TODAYDATE), "Selection", "YTD"),
ADDCOLUMNS(CALENDAR(MonthStart, TODAYDATE), "Selection", "MTD")
)
RETURN
Result
please help me to resolve error
Hi Sir, thank you for your sharing. The method is really simple and clear. However, this slicer seems doesn't work on visuals that contains last year's data.
I have a clustered column chart that contains this year and last year's column. When I click the slicer, it works perfect with this year's column, but last year's column just disappear. Do you have any suggestion to fix the problem?
thank you very much
You can use a measure to show last year data along with current year. In last year calculation you can ignore current MTD/YTD filter or you can filter it based on month and year only.
Hi, thanks for the post..Wer you able to fix this? I also have a similar issue and getting blanks for LY data column.
Nice 👍
How do you do that moving bar along the top???
I need to know now hahaha!!!
I used a custom visual here. You can also find it just search for Scroller.
Nice 👍👏
Nice
getting error