Forum Discussion

kavya_gp's avatar
kavya_gp
Frequent Visitor
2 years ago
Solved

Current Year vs avg previous years

Dear community,

I'm new to PowerBI and need help.

I'm trying to display a bar graph of precipication of current year and would like a line of average of previous years precipication 

 

My chart currently looks like this

 

And would like a chart with Average of previous years grouped by month like this

 

 

 

My data looks like this :

 

monthly_dateprecipitation_sum
1/1/200850
2/1/200840
3/1/200834
4/1/2008234
5/1/200812
6/1/200812
7/1/2008423
  • I was able to do the same, I grouped by month and created a column sum, and another column to count the no of months, I then dicided the sum by count to get average precipitation per month.

     

    here is my visual

     

     

     

4 Replies

  • Hi,

    Share data of 2 years and show the expected result in a simple Table format.  Once we create the table, we will easily be able to plot it on a visual.

    • kavya_gp's avatar
      kavya_gp
      Frequent Visitor

      for the expected result, I want a bar graph with a line of the average precipitation for the previous years grouped by month,

  • kavya_gp's avatar
    kavya_gp
    Frequent Visitor

    Hi Ashish please find the entire dataset

     

    monthly_dateprecipitation_sum
    1/1/2008101.1999957
    2/1/2008114.5999997
    3/1/200868.600001
    4/1/2008223.6000072
    5/1/2008597.3999966
    6/1/2008577.3999986
    7/1/2008286.5999974
    8/1/2008262.1999979
    9/1/2008235.8000024
    10/1/200840.4000006
    11/1/2008129.6000043
    12/1/2008240.5999998
    1/1/2009121.1999996
    2/1/200968.60000168
    3/1/200985.00000026
    4/1/2009188.9999918
    5/1/2009193.2000019
    6/1/2009367.2000079
    7/1/2009403.400006
    8/1/2009281.0000014
    9/1/2009115.2000024
    10/1/2009331.7999934
    11/1/200954.2000015
    12/1/2009169.1999949
    1/1/201092.6000016
    2/1/201048.8000006
    3/1/201052.800001
    4/1/2010565.8000064
    5/1/2010652.99999
    6/1/2010759.7999892
    7/1/2010306.1999972
    8/1/2010341.5999994
    9/1/2010236.6000023
    10/1/201090.3999956
    11/1/2010294.2000051
    12/1/201058.00000076
    1/1/2011248.8000021
    2/1/2011114.1999989
    3/1/2011145.4000017
    4/1/2011339.3999951
    5/1/2011540.2000021
    6/1/2011500.3999999
    7/1/2011105.3999998
    8/1/2011104.0000027
    9/1/201188.4000032
    10/1/2011284.6000028
    11/1/201195.0000007
    12/1/201174.20000008
    1/1/201260.00000126
    2/1/201293.2000018
    3/1/2012174.8000012
    4/1/2012321.1999978
    5/1/2012490.59999
    6/1/2012756.0000099
    7/1/2012177.8000062
    8/1/2012175.2000069
    9/1/201230.7999996
    10/1/2012296.8000065
    11/1/2012163.1999976
    12/1/201255.99999918
    1/1/201397.60000378
    2/1/201360.2000024
    3/1/2013113.7999993
    4/1/2013336.1999928
    5/1/2013415.3999934
    6/1/2013599.6000042
    7/1/2013232.7999987
    8/1/2013218.6000026
    9/1/2013442.6000098
    10/1/2013132.5999968
    11/1/2013106.8000027
    12/1/2013218.1999881
    1/1/2014125.7999986
    2/1/201431.6000013
    3/1/2014191.6000044
    4/1/2014235.2000023
    5/1/2014367.8000011
    6/1/2014830.6000283
    7/1/2014116.0000004
    8/1/2014505.200003
    9/1/2014383.8000081
    10/1/2014115.9999991
    11/1/2014283.0000104
    12/1/2014113.8000011
    1/1/2015131.3999998
    2/1/201562.6000014
    3/1/2015195.0000001
    4/1/2015105.9999995
    5/1/2015192.3999986
    6/1/2015157.6000016
    7/1/2015371.600011
    8/1/2015119.0000004
    9/1/2015312.1999992
    10/1/2015144.7999992
    11/1/2015174.0000065
    12/1/2015104.4000001
    1/1/201697.1999996
    2/1/201687.40000078
    3/1/2016134.8000055
    4/1/2016257.6000067
    5/1/2016600.7999818
    6/1/2016262.8000016
    7/1/2016430.7999971
    8/1/2016412.0000065
    9/1/2016204.8000033
    10/1/2016329.2000049
    11/1/201629.4000004
    12/1/2016109.4000034
    1/1/201777.59999568
    2/1/2017155.4000014
    3/1/2017123.9999932
    4/1/2017310.6000013
    5/1/2017323.0000094
    6/1/2017324.0000087
    7/1/201789.9999958
    8/1/201787.6000004
    9/1/201767.00000008
    10/1/2017372.6000072
    11/1/2017160.000007
    12/1/2017194.3999957
    1/1/201869.2000016
    2/1/2018246.2000034
    3/1/2018224.0000011
    4/1/2018182.8000008
    5/1/2018155.999997
    6/1/2018449.2000016
    7/1/2018125.1999983
    8/1/2018123.0000072
    9/1/2018194.8000004
    10/1/2018152.600002
    11/1/2018175.1999997
    12/1/201890.3999967
    1/1/201981.7999992
    2/1/2019161.600004
    3/1/201968.7999978
    4/1/2019176.5999945
    5/1/2019289.0000011
    6/1/2019410.2000004
    7/1/2019217.600002
    8/1/2019220.999998
    9/1/2019463.8000167
    10/1/2019140.2000008
    11/1/2019341.7999937
    12/1/201990.6000004
    1/1/2020110.0000016
    2/1/2020157.1999942
    3/1/2020153.6000049
    4/1/2020154.999997
    5/1/2020518.9999899
    6/1/2020640.2000088
    7/1/2020196.1999991
    8/1/202041.80000056
    9/1/2020228.2000122
    10/1/2020222.5999986
    11/1/2020269.7999971
    12/1/202098.6000029
    1/1/202131.9999992
    2/1/2021113.2000022
    3/1/202196.0000004
    4/1/2021167.5999982
    5/1/2021394.4000022
    6/1/2021207.4000077
    7/1/202149.59999848
    8/1/2021322.799998
    9/1/202180.6000003
    10/1/2021211.1999993
    11/1/2021106.0000001
    12/1/2021136.5999997
    1/1/202292.99999998
    2/1/2022128.1999967
    3/1/2022131.2000038
    4/1/2022126.5999993
    5/1/2022192.8000001
    6/1/2022864.9999958
    7/1/2022265.5999976
    8/1/2022125.0000066
    9/1/202287.2000037
    10/1/2022258.9999965
    11/1/2022245.7999958
    12/1/2022233.4000041
    1/1/202378.39999918
    2/1/2023178.799999
    3/1/2023134.1999989
    4/1/2023120.8000046
    5/1/2023283.4000011
    6/1/2023228.5999939
    7/1/2023157.0000048
    8/1/2023212.200011
    9/1/202385.60000118
    10/1/2023272.9999964
    11/1/202362.8000011
    12/1/202376.39999878
    1/1/2024413.7999982
    2/1/2024640.7000128
    3/1/2024276.300007
  • kavya_gp's avatar
    kavya_gp
    Frequent Visitor

    I was able to do the same, I grouped by month and created a column sum, and another column to count the no of months, I then dicided the sum by count to get average precipitation per month.

     

    here is my visual