Forum Discussion
Henricus
3 years agoFrequent Visitor
Using mutltiple dates in a table
Hi, I have a question using dates in a table. I have a dataset consisting of the following columns: name, date, score The dates range is different per dataset, but it's done per day, so eac...
Henricus
3 years agoFrequent Visitor
Greg_Deckler
3 years agoCommunity Champion
Henricus OK, see attached PBIX below signature. The measure is:
change =
VAR __Score = SUM('Table'[Score])
VAR __Date = MAX('Table'[Date])
VAR __Name = MAX('Table'[Name])
VAR __PreviousDate = MAXX(FILTER(ALL('Table'),[Name] = __Name && [Date] < __Date),[Date])
VAR __PreviousScore = SUMX(FILTER(ALL('Table'),[Name] = __Name && [Date] = __PreviousDate),[Score])
RETURN
IF(__PreviousScore = BLANK(), BLANK(), __Score - __PreviousScore)- Henricus3 years agoFrequent Visitor
Thanks for your reply Greg_Deckler!
I'll check it out tomorrow on my working computer.
One other question though, How do I get those date columns? They don't seem to work.Like, can I get columns starting on the first of the month for example?
Thanks again.
Kind regards,
Henricus- Greg_Deckler3 years agoCommunity Champion
Henricus You can use something like DATEVALUE("Jan 2022")
- Henricus3 years agoFrequent Visitor
Greg_Deckler ahh, like just a new measurement?
Thanks!