The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.
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 | 5 |
B | 2019 Mar 2 | 8 |
B | 2019 Mar 3 | 16 |
B | 2019 Mar 4 | 20 |
C | 2019 Mar 5 | 100 |
Expected output:
[Filter, only select 2 date per report, e.g. i select Mar-2 & Mar 4]
Page | 2019 Mar 2 | 2019 Mar 4 | Difference |
A | 15 | 20 | 5 |
B | 8 | 20 | 12 |
C | 0 | 0 | 0 |
*OK not showing C if there's no value on that date.
Thanks in advance!
Solved! Go to Solution.
Hi @Anonymous
Kindly check my below results:
Pbix attached.
@Anonymous
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))
User | Count |
---|---|
68 | |
63 | |
59 | |
54 | |
28 |
User | Count |
---|---|
182 | |
81 | |
63 | |
47 | |
41 |