How to Start with N-1 Date

Hello, currently i have a many data and need to analyze on dashbord, i need to showing the last data on dashboard but the last data is a N-1 data, for example


31 October = Last Data
I want to start with N-1 data (start from 29 October 2022)
How to get this?


Hello @ringgo - This can be achieved by leveraging calculated field. Please see the below snapshot for reference. Hope this help!

Did my suggestion help you in resolving your query? If yes, would request you to mark the post as “Solution”. This will help the community to find guidance and answers to similar question. Thank you!

Are you trying to compare the value (i.e. value of a measure e.g. Sales) corresponding to the latest date of the dataset with previous date’s measure value. A snapshot of your sample dataset and expected output would really help. Thank you!

for example

i need to compare the right value with the previous date?

@ringgo - I believe in that case you perhaps can leverage periodOverPeriod functions. Please see the below snapshot. The calculation allows you to compare sales with previous day. Hope this helps!

periodOverPeriodLastValue(sum(Sales), {Order Date},DAY, 1)

i tried using this logic, but the result “nothing”

This is wierd!! As I could easily replicate it at my end. Can you please tell me if the measure column i.e. KemarinAdalah (from your snapshot) is a native field or a calculated field. If its a calculated field can you please share the calculation details please.

sorry, i put the wrong measure column
now worked, thanks

can we change the data type on calculate field? cause addDateTime(-1, 'DD', {date}) is string

Glad to know that it works now. :slight_smile: In the Dataset, you can assign the correct datatype of the columns.