Forum Discussion
chotu27
8 years agoPost Patron
Get Previous record
Hi All, I wanted to find previous record in matrix visual based on hierachy displayed below. Any Help with DAX please help me
TomMartens
8 years agoSuper User
Hey,
to compare score with previous score just create this measure (assuming both are measures):
Compare=
SUMX('yourtablename'
,IF([score] > [previous score], 1, 0)
)
If one or both are columns replace the reference with the following:
SUM('yourtablename'[score])
You may have to enclose the above into a CALCULATE(...)
Regards
Tom
to compare score with previous score just create this measure (assuming both are measures):
Compare=
SUMX('yourtablename'
,IF([score] > [previous score], 1, 0)
)
If one or both are columns replace the reference with the following:
SUM('yourtablename'[score])
You may have to enclose the above into a CALCULATE(...)
Regards
Tom
chotu27
8 years agoPost Patron
I am not asking about comparison . I asking how to find previous record column to do comparison
- TomMartens8 years agoSuper User
Hey,
can you please provide some sample data, that we can easily copy to Power BI and also provide how var1 to varn is sorted, are there possiblities that there are var1 and var3 in a group and for this group var1 provides the previous data for var3?
Regards
Tom