Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Hi all,
I am stucked while calculating sales with different conditions. Let me explain in detail
I have a calendar table and a Sales table, and looking for a dax where if i am selecting any date using calendar date which is not equal to current data then the dax should calculate sales where the selected date should less than or equal to posting date and selected date is greater than Clearing date. and Condition type = BSAD (Note:- Posting date & Clearing date & Condition Type are 3 different columns in Sales Table).
Thanks in advance.
Solved! Go to Solution.
@jay_patel , Try a measure like
Measure =
var _max = maxx(allselected('Date1'),'Date1'[Date])
var _m = Calculate(sum(Table[Value]), filter(Table, Table[Posting Date] >=_max && Table[Cleaning Date] <=_max && [Condition type] = "BSAD"))
return
if(isblank(sum(Table[Value])), _m, sum(Table[Value]))
or
If date tble is joined
Measure =
var _max = maxx(allselected('Date1'),'Date1'[Date])
var _m = Calculate(sum(Table[Value]), filter(all(Table), Table[Posting Date] >=_max && Table[Cleaning Date] <=_max && [Condition type] = "BSAD"))
return
if(isblank(sum(Table[Value])), _m, sum(Table[Value]))
Hi jay,
now i am facing same issue with vendors data,
please consider the below text.
(Hi all,
I am stucked while calculating sales with different conditions. Let me explain in detail
I have a calendar table and a Sales table, and looking for a dax where if i am selecting any date using calendar date which is not equal to current data then the dax should calculate sales where the selected date should less than or equal to posting date and selected date is greater than Clearing date. and Condition type = BSAD (Note:- Posting date & Clearing date & Condition Type are 3 different columns in Sales Table).)
@jay_patel , Try a measure like
Measure =
var _max = maxx(allselected('Date1'),'Date1'[Date])
var _m = Calculate(sum(Table[Value]), filter(Table, Table[Posting Date] >=_max && Table[Cleaning Date] <=_max && [Condition type] = "BSAD"))
return
if(isblank(sum(Table[Value])), _m, sum(Table[Value]))
or
If date tble is joined
Measure =
var _max = maxx(allselected('Date1'),'Date1'[Date])
var _m = Calculate(sum(Table[Value]), filter(all(Table), Table[Posting Date] >=_max && Table[Cleaning Date] <=_max && [Condition type] = "BSAD"))
return
if(isblank(sum(Table[Value])), _m, sum(Table[Value]))
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
| User | Count |
|---|---|
| 94 | |
| 70 | |
| 50 | |
| 40 | |
| 39 |