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.
Hello, I am trying to find a distinct count of locations within the first 15 days of a month.
Basically the 45 card is filtered by the dates between slicer and the 49 card is set to "Do Not Interact". I would like a measure that calcuates the 45 without needing a slicer. Thanks!
Solved! Go to Solution.
@water-guy-5 , Try like
measure =
var _max1 = minx(allselected('Date'), 'Date'[date]) //selected value or take today
var _max = eomonth(_max,-1) +15
var _min = eomonth(_max,-1) +1
return
calculate(sum(Table[Value]), filter(Table, Table[Date] >=_min && Table[Date]<=_max))
@water-guy-5 , if you need based on today's date
measure =
var _max = today() // or today() -1
var _min = today() -15 //or 16
return
calculate(sum(Table[Value]), filter(Table, Table[Date] >=_min && Table[Date]<=_max))
this will be for a kpi dashboard and the entire page will be filtered by relative date = in this month, so i don't need the specific days. more looking for "beginning of month", "beginning of month +15" or something like that.
@water-guy-5 , Try like
measure =
var _max1 = minx(allselected('Date'), 'Date'[date]) //selected value or take today
var _max = eomonth(_max,-1) +15
var _min = eomonth(_max,-1) +1
return
calculate(sum(Table[Value]), filter(Table, Table[Date] >=_min && Table[Date]<=_max))
User | Count |
---|---|
65 | |
59 | |
55 | |
53 | |
30 |
User | Count |
---|---|
180 | |
88 | |
72 | |
48 | |
46 |