Forum Discussion

zacharylwy's avatar
zacharylwy
Frequent Visitor
1 year ago
Solved

21-day Moving Average on a Measure

I am trying to create a 21-day moving average on a measure called 'Total Voy Intake'. I have a data set of export volumes called 'guinea'. The main table has the structure: Load Date Load Port...
  • zacharylwy's avatar
    1 year ago

    Hi all,

    Found the issue and fixed it:
    When consolidating the data, I enter "0" rows for dates that do not have any intakes.
    Then on Power BI I use the COALESCE function with 0 again.
    The PowerBI step actually can handle dates that do not have data without requiring the "0" rows.

    The fix was I do not manually populate empty dates with "0" rows. I pull raw data as it is, import it into BI, and stick to the same Total Voy Intake measure as above.