Forum Discussion
Anonymous
6 years agoNot applicable
compare value based on 2 date selected
HI all, I'm new to PowerBI and figuring out the way to visulize result of 2 date comparison. Raw data I have: Page Date PageView A 2019 Mar 2 15 A 2019 Mar 4 20 A 2019 Mar 10...
- 6 years ago
Hi Anonymous
Kindly check my below results:
Pbix attached.
amitchandak
Super User
6 years agoAnonymous
Prefer a diff measure like given below. Prefer 1st if it works
Measure =
var _max = maxx(Date,date[Date])
var _min = maxx(Date,date[Date])
return
calculate(sum(Table[PageView]),date[Date]=_max) - calculate(sum(Table[PageView]),date[Date]=_min)
Measure =
var _max = maxx(Date,date[Date])
var _min = maxx(Date,date[Date])
return
calculate(sum(Table[PageView]),filter(all(Date),date[Date]=_max)) - calculate(sum(Table[PageView]),filter(all(Date),date[Date]=_min))
- Anonymous6 years agoNot applicable'All' is my table, the diff is always 0.DateDifference =var _max = MAXX('All', 'All'[Date])var _min = MINX('All', 'All'[Date])returncalculate(sum('All'[pageview]),filter(ALL('All'[Date]),'All'[Date]=_max)) - calculate(sum('All'[pageview]),filter(ALL('All'[Date]),'All'[Date]=_min))