4 Replies Latest reply: Aug 7, 2018 6:56 AM by Kenneth Andersen RSS

    Expression doesn't work after adding data

    Kenneth Andersen

      I have this expression

       

      Sum({ <Uniq_ID=,q16udland-={"Udlandet"}>}Aggr(Only([weight]), Uniq_ID))

      /

      Sum({ <q16udland-={"Udlandet"},Kommune={*}>} [weight])


      which gives me this this chart (how many percent of the selected "Kommune" )

       

      Udklip.JPG

       

       

      So far so good.

       

      But when I add this small data sample the expression doesn't work anymore (gives me 100%):

      [BefolkningKommune]:

      LOAD

                                 [Kommune],

                                 [Periode],

                                 [Kommune Size]

      FROM [lib://DK-stat/Befolkning.xlsx]

      (ooxml, embedded labels, table is BefolkningKommune);

       

      New data is just telling me the size of every "Kommune" (Community) in Denmark per Period.

       

       

      The question is: How do I change my expression in order to work even if I add the new data? Changing the fieldnames is not an option.