Yes. Immutability does not mean you cannot filter out specific data instances. You can easily use a portion of a block or a few blocks within a transaction for your analysis.