Don't miss your chance to take the Fabric Data Engineer (DP-600) exam for FREE! Find out how by attending the DP-600 session on April 23rd (pacific time), live or on-demand.
Learn moreNext up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now
Hi,
In the screenshot the Total is displayed as 40, but I required the Variance amount as May month amount as 30 minus Jul as 5 to be variance as 25 (i.e Month of First selected month - Month of Last selected month (30-5) = 25, (20-30) = -10,..)
If I select all, the Variance of Apr Month minus March.
Solved! Go to Solution.
@Umadhandapani , Try a measure like
Move this to total using isinscope
//Difference between two selected dates
diff =
var _max = maxx(allselected('Date'),'Date'[Date])
var _min = maxx(allselected('Date'),'Date'[Date])
return
calculate( sum(Table[Value]), filter('Date', Eomonth('Date'[Date],0) =eomonth(_min,0) )) -
calculate( sum(Table[Value]), filter('Date', Eomonth('Date'[Date],0) =eomonth(_max,0) ))
Final measure =
if(isinscope('Date'[Month]), sum(Table[Value]), [diff ])
@Umadhandapani , Try a measure like
Move this to total using isinscope
//Difference between two selected dates
diff =
var _max = maxx(allselected('Date'),'Date'[Date])
var _min = maxx(allselected('Date'),'Date'[Date])
return
calculate( sum(Table[Value]), filter('Date', Eomonth('Date'[Date],0) =eomonth(_min,0) )) -
calculate( sum(Table[Value]), filter('Date', Eomonth('Date'[Date],0) =eomonth(_max,0) ))
Final measure =
if(isinscope('Date'[Month]), sum(Table[Value]), [diff ])
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Experience the highlights from FabCon & SQLCon, available live and on-demand starting April 14th.
| User | Count |
|---|---|
| 48 | |
| 40 | |
| 40 | |
| 20 | |
| 16 |
| User | Count |
|---|---|
| 70 | |
| 67 | |
| 32 | |
| 27 | |
| 25 |