How to build dynamic MTD/YTD Slicer | Power Bi | Data Analyst

Поделиться
HTML-код
  • Опубликовано: 27 окт 2024

Комментарии • 14

  • @Mahesh717
    @Mahesh717 9 месяцев назад +1

    can we use
    YTD & MTD function directly instead of startmonth & year function !

  • @michelleanwar3025
    @michelleanwar3025 2 месяца назад

    hello, which visual did you drag the selection dax measure to?

  • @goforarsh
    @goforarsh Год назад +1

    Whatta amazing explanation.

  • @ashwinimali6310
    @ashwinimali6310 2 месяца назад

    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

  • @katiawei6817
    @katiawei6817 Год назад +1

    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

    • @daxpertpraveenks724
      @daxpertpraveenks724  Год назад

      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.

    • @shrined-vine4972
      @shrined-vine4972 10 месяцев назад +1

      Hi, thanks for the post..Wer you able to fix this? I also have a similar issue and getting blanks for LY data column.

  • @Starbucks4141
    @Starbucks4141 Год назад

    Nice 👍

  • @x17aerialconsultancy51
    @x17aerialconsultancy51 Год назад +1

    How do you do that moving bar along the top???

  • @naimbinjameel282
    @naimbinjameel282 Год назад

    Nice 👍👏

  • @sureshreddy-kt4xr
    @sureshreddy-kt4xr Год назад

    Nice

  • @mahithamylo66
    @mahithamylo66 9 месяцев назад

    getting error