Count with Selected Value one day Prior Count Issue

SICK_Fact.xlsx (5.9 KB)
Count_Edna.pbix (68.4 KB)

Dear Experts,
Need your guidance to get the count of the pervious day.
Attached sample file for your reference.

in my dashboard, i have given a filter where user can select the date and based on that it will show the number of people reported SICK.

As part of the requirement based on the selected date i want to show the count of the previous day as well and take a difference of both count.
i.e. selected date and one day prior. like
selected Date: 03 Aug 2024
one day prior of selected Date = 02 Aug 2024

The issue is when selected date count is coming but one day prior count in not coming its gives blank. however one day prior of selected Date is calculated correctly.

The yellow highlighted is not coming.
Can you please guide me how to get the correct value of 16.
Appreciate if you can guide me the reason why this logic is not working.

I have tried Chat GBT also for last two days and still i am unable to have it resolved.

Do let me know if you have any queries.

Thank you

Hi @EnanBahadur,

Have you tried using DataMentor/EDNA AI tools built within the EDNA platform? the tool will be able to help you with your problem.

Couple things to remember…Mark your date table as a Date table.

Try this:
test = CALCULATE(
COUNTROWS(Sick_Fact),
(PREVIOUSDAY(Calendar_DIM[Date])))

I hope this helps.
Keith