How to display sales difference between today and yesterday?

I want to have two cards or display two numbers that is today’s sales and yesterdays sales and maybe and have arrow (green arrow up if sales went up today) or red arrow If sales is down. How can I achieve that?

Hello Neekunj,
Like this?

Yes. Almost like this.

Like this?

I want like this

here you go, someone else also asked similar question so instead of arrow the red/green background color is used, you can adjust to arrow. Also for ‘yesterday’ i used ‘before today’ you can add more then one criteria to build result that gives you just yesterday. If you find the roll up doesnt work let me know i’ll see other ways to do it.
The front end is a list component.

1 Like

This does not work as I have lot of items so list show total yesterday for all items instead of summary as one field

Here’s something that might help, it’s a bit complex.

Some useful links:

My code in the video for this section:

{{#gte totalYesterday totalToday}}
    <span class="lower">🔻 ${{totalYesterday}} Yesterday</span>
     <span class="higher">🔼 ${{totalYesterday}} Yesterday</span>

result shown using all types of components, use table the process is the same. use the sales table instead and not the group by products table as i have used.

new product ‘oranges’ added. So now you have Apples and Oranges sales today vs yesterday.