Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
pprasad2
Helper I
Helper I

PREVIOUSDAY function Duplicate Dates Error

Hi, 

I am trying to find out the previous day Service Requests(Based on date user chooses) and it seems like I am mising something.

My data looks like this. I have date in the same table.

pprasad2_0-1594750688185.png

 

My New Measure for Prior Day request is like this:

pprasad2_1-1594750723402.png

I am getting the following error:

pprasad2_2-1594750742896.png

 

I even tried with 'LAST DATE' & NEW COLUMN given in below post but still did not work.

https://community.powerbi.com/t5/Desktop/Previousday-function-problem/m-p/1100277#M509432

New Column = SUMX(FILTER(DLY_VW, DLY_VW[Date Range]=EARLIER(DLY_VW[LastDate])-1), [Total Servcie Change Requests])

Can somebody help me with this?

 

Regards

PPRASAD2

 

 

 

1 ACCEPTED SOLUTION
v-easonf-msft
Community Support
Community Support

Hi , @pprasad2 

I can reproduce your problem. For more details ,please check the sample file.

58.png

 

You are using time intelligence functions PREVIOUSDAY which is suggest to use with a separate date table/dimension.

There are duplicate values(Date Range) in your table ( same date in multiple rows ).

It is suggest to create a calendar table with unique and continuous dates that cover all periods of your fact table.

 

sample file

 

Best Regards,
Community Support Team _ Eason
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

4 REPLIES 4
v-easonf-msft
Community Support
Community Support

Hi , @pprasad2 

Could you please tell me whether your problem has been solved?
If yes, you could accept the helpful answer as solution. You also could share your own solution here. For now, there is no content of description in the thread. If you still need help, please share more details to us.

Best Regards,
Community Support Team _ Eason
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

v-easonf-msft
Community Support
Community Support

Hi , @pprasad2 

I can reproduce your problem. For more details ,please check the sample file.

58.png

 

You are using time intelligence functions PREVIOUSDAY which is suggest to use with a separate date table/dimension.

There are duplicate values(Date Range) in your table ( same date in multiple rows ).

It is suggest to create a calendar table with unique and continuous dates that cover all periods of your fact table.

 

sample file

 

Best Regards,
Community Support Team _ Eason
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi @v-easonf-msft, can you provide the sample file again? I cannot access the sample file. Thank you

Greg_Deckler
Community Champion
Community Champion

See if my Time Intelligence the Hard Way provides a different way of accomplishing what you are going for.

https://community.powerbi.com/t5/Quick-Measures-Gallery/Time-Intelligence-quot-The-Hard-Way-quot-TIT...



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors