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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

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
Super User
Super User

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!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

Check out the May 2024 Power BI update to learn about new features.

Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.