Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago

Average YTD with summarized data

I am attempting to show average ytd (Jan shows Jan, Feb shows av(Jan,Feb), Mar shows av(Jan,Feb,Mar)...) in a line graph, but I cannot figure it out.

I have east coast and west coast data.

Each instance has a quantity associated with it, but I need the calculation to be a percent: east/total, summarized, because each instance would simply be 1 or 0.

I have month start date.

Any tips?

5 Replies

  • Hi,

    I am not sure if I understood your question correctly, but I tried to create a sample pbix file like the attached.

    Please check the attached pbix file. All measures are in the attached pbix file.

    I hope the below can provide some ideas on how to create solutions for your dataset.

     

    • Anonymous's avatar
      Anonymous
      Not applicable

      Didn't quite work. Date field not as robust. Sample data:

      NEED: average ytd quantity east as a percent of total quantity by period, (for month 1: av(month 1), for month 2: av(month1 and month 2)….

       

      MonthPeriodic Month Deadline DateTotal QuantityQuantity LocationQuantity EastMonthly Average of East/Total YTD%
      11/12/202218823East18823 
      11/12/20221243East1243 
      11/28/2022465743East465743 
      11/28/202224352West0 
      22/10/202223425West0 
      22/10/2022254254East254254 
      22/10/2022684East684 
      22/10/20223457West0 
      22/19/202234West0 
      22/19/2022757333East757333 
      22/19/20223456West0 
      22/28/202223525East23525 
      22/28/2022757West0 
      22/28/2022346West0 
      33/4/2022377658West0 
      33/4/20222654West0 
      33/4/202216382East16382 
      33/19/2022618647East618647 
      44/4/2022984West0 
      44/4/20226115West0 
      44/4/20226184West0 
      44/4/20224968136East4968136 
      44/19/20224984East4984 
      44/19/202213854East13854 
      44/19/20221683East1683 
      44/30/2022968413West0 
      44/30/20226814East6814 
      55/2/20228641West0 
      55/2/2022384341West0 
      55/2/20224684East4684 
      55/2/2022168616West0 
      55/12/20226484East6484 
      55/12/2022165West0 
      55/12/2022648West0 
    • Anonymous's avatar
      Anonymous
      Not applicable

      Hi Jihwan,

      This solution is close but not quite right. I feel like there is an issue with the measure titled "quantity measure:" as I am not sure how that one is being filtered to return only East values, if at all. When I return the ratio measure, I get periodic east/total, but cannot yet year to date averages.

  • v-zhangti's avatar
    v-zhangti
    Icon for Community Support rankCommunity Support

    Hi, Anonymous 

     

    Can you provide sample data for testing? Sensitive information can be removed in advance. What kind of expected results do you expect? You can also show it with pictures.

     

    Best Regards,

    Community Support Team _Charlotte

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

    • Anonymous's avatar
      Anonymous
      Not applicable

      Didn't quite work. Date field not as robust. Sample data:

      NEED: average ytd quantity east as a percent of total quantity by period, (for month 1: av(month 1), for month 2: av(month1 and month 2)….

       

      MonthPeriodic Month Deadline DateTotal QuantityQuantity LocationQuantity EastMonthly Average of East/Total YTD%
      11/12/202218823East18823 
      11/12/20221243East1243 
      11/28/2022465743East465743 
      11/28/202224352West0 
      22/10/202223425West0 
      22/10/2022254254East254254 
      22/10/2022684East684 
      22/10/20223457West0 
      22/19/202234West0 
      22/19/2022757333East757333 
      22/19/20223456West0 
      22/28/202223525East23525 
      22/28/2022757West0 
      22/28/2022346West0 
      33/4/2022377658West0 
      33/4/20222654West0 
      33/4/202216382East16382 
      33/19/2022618647East618647 
      44/4/2022984West0 
      44/4/20226115West0 
      44/4/20226184West0 
      44/4/20224968136East4968136 
      44/19/20224984East4984 
      44/19/202213854East13854 
      44/19/20221683East1683 
      44/30/2022968413West0 
      44/30/20226814East6814 
      55/2/20228641West0 
      55/2/2022384341West0 
      55/2/20224684East4684 
      55/2/2022168616West0 
      55/12/20226484East6484 
      55/12/2022165West0 
      55/12/2022648West0