Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
Hi @ all,
I am trying to calculate sum of sales value for min date in a month (month filter applied) and compare to other dates. Customer ID and month filters are applied.
Note: if the 1st date of the month has blank values the next day value should be returned.
Below is the table with expected resulted. Please help me in achiving it.
Date Sales Min Date Sales %diff with min date sales
March 01 0 0
March 02 0
March 03 300 300 100%
March 04 450 300 50%
March 05 600 300 200%
March 06 150 300 -50%
@AnilGudap666 , Try a measure like
new Measure =
var _min = calculate(Min(Table[Date]) , filter(allselected(sales), [customer id] = max(sales[Customer id]) && table[sales]<> 0 && not(isblank(Table[Sales]))))
var _sales = calculate(Sum(Table[sales]) , filter(allselected(sales), [customer id] = max(sales[Customer id]) && table[sales]<> 0 &&Table[Date] =_min ))
return
divide(Sum(Table[sales]) -_sales,_sales)
User | Count |
---|---|
98 | |
90 | |
82 | |
73 | |
67 |
User | Count |
---|---|
115 | |
102 | |
98 | |
71 | |
67 |