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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
Anonymous
Not applicable

Compare values between two Dates

Hello All,

 

I have temperature data with intervels of 3 every minutes as below.

TimeTemperature
11:03:00AM23.03
11:06:00AM28.64
11:09:00AM29.32
11:12:00AM25.77
11:15:00AM24.71

 

Now i would like to compare each value with the previous value by the time.

 

I did it for the months by using Previousmonth function, but i couldnt find anything to calculate for previous minute values.

 

Can anyone please suggest me.

 

Thanks

Mohna V

5 REPLIES 5
Greg_Deckler
Super User
Super User

Try this:

 

Column = 
VAR previousTime = MAXX(FILTER(ALL(Temp),[Time]<EARLIER([Time])),[Time])
RETURN MINX(FILTER(ALL(Temp),[Time]=previousTime),[Temperature])

@ 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...
Anonymous
Not applicable

Thanks for the reply @Greg_Deckler.

 

Sorry that i didnt mentioend in question that i am using slicer called phases which is having three types B,R, and Y phases.

 

When i used your query, it did worked for one phase that is B, when i filter it using slicer, but it is not with other two phases.

1.PNG

 

But not with other two types. it is giving the b phase values only for rest of two types.

 

2.PNG3.PNG

 

Any help.

 

Thanks,

Mohan V

Stachu
Community Champion
Community Champion

How does the slicer link to the original data table?
What is the syntax for VALUE?



Did I answer your question? Mark my post as a solution!
Thank you for the kudos 🙂

Anonymous
Not applicable

Thanks for the reply @Stachu.

 

VALUE is nothing but the temperature values as i mentioned in question.

Here in my table i have three types of temperature values which are like phase wise as i mentioend in above comment.

 

Stachu
Community Champion
Community Champion

looking at the raw input from the data and the values visible in the other screenshots VALUE seems to be aggregations of the original temperatures - SUM? MAX? AVERAGE?
Right now all that you said is way to general to give a specific answer to your question, it's not clear how slicer is linked to the output (filter in measure? join between tables? some other way?)



Did I answer your question? Mark my post as a solution!
Thank you for the kudos 🙂

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.