The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
I need create report like this style, to compare two date Sales different :
Power bi can create report like this:
our data source is simple, single fact table, Date slicer will just choose two date,
I want find the easy way to create measure for Diff and Diff%.
Is any one have good suggestion,
Thank you ahead.
Solved! Go to Solution.
@wangjuan303 , Using one slicer 2 selected date diff
diff =
var _max = maxx(allselected('Date'),'Date'[Date])
var _min = minx(allselected('Date'),'Date'[Date])
return
calculate(sum(Table[value]), filter(date, Date[Date] =_max)) - calculate(sum(Table[value]), filter(date, Date[Date] =_min))
or refer
How to use two Date/Period slicers :https://www.youtube.com/watch?v=WSeZr_-MiTg
@wangjuan303 , Using one slicer 2 selected date diff
diff =
var _max = maxx(allselected('Date'),'Date'[Date])
var _min = minx(allselected('Date'),'Date'[Date])
return
calculate(sum(Table[value]), filter(date, Date[Date] =_max)) - calculate(sum(Table[value]), filter(date, Date[Date] =_min))
or refer
How to use two Date/Period slicers :https://www.youtube.com/watch?v=WSeZr_-MiTg
Thank you so much, It is nice solution,
User | Count |
---|---|
80 | |
78 | |
37 | |
34 | |
31 |
User | Count |
---|---|
93 | |
81 | |
60 | |
49 | |
49 |