Query/ Project problem

Hello,
i am new to event sourcing and trying to run query. fromStream('report_campaign-91468621') runs fine but fromCategory along with foreachStream does not work and shows blank state.

Any idea’s what am i doing wrong?

fromStream('report_campaign-91468621')
// fromCategory('report_campaign')
//   .foreachStream()
  .when({
    $init: function(state, ev) {
      return { count: 0, clicks: 0, impressions: 0};
    },
    $any: function(state, ev) {
      state.count++;
      state.impressions += ev.body.reportCampaign.impressions;
      state.clicks += ev.body.reportCampaign.clicks;
      return state;
    }
  }).outputState();

Did you paste the stream name into the state box?
You need to select which state you want to view.
(btw it would be really cool if there was a “recently viewed” state option here!)

how or where to select the state from? you mean partition? i put 91468621 and it works fine… so basically without partition i was expecting it will show whole array of every result without filter :smile: