Forum Discussion

gumis_rulez's avatar
gumis_rulez
Icon for Helper I rankHelper I
2 years ago
Solved

Moving average with parameters

Hi,   I am trying to calculate moving average which time frame will be affected by choosen month. If I choose May, the Montly Sales Chart is showing data up to May. Would like to achieve also with ...
  • SachinNandanwar's avatar
    2 years ago

    Its due to selection on this slicer 

    So its basically plotting averages X months ahead of a given month

     

  • Anonymous's avatar
    Anonymous
    2 years ago

    Hi All,
    Firstly  SachinNandanwar thank you for your solution!
    And gumis_rulez  to my understanding,you want to align the month in which Moving Average Quantity occurs with the Average Quantity value, your DAX statement is working, the problem is mainly in the field, we can add some filters to our visual object to achieve what you need.

    a = IF(
       [Average Quantity (Months Table)]<>BLANK(),
       1,
       0)

     

     

    Hope it helps!

     

    Best regards,
    Community Support Team_ Tom Shen

    If this post helps then please consider Accept it as the solution to help the other members find it more quickly.