March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
I need help.
I am trying to create a measure that counts the # of items ordered since an account was created. I manually keyed 01/01/2022 in the measure below and was able to get the result I expected.
COUNTROWS(
GROUPBY(FILTER(Table,Table[First Sample Date]>= DATE(2022,01,01)),Table[Sample ID],Table[Order Choice Type])
)
Unfortunately, I can't figure out how to update the syntax in the measure to dynamically display correctly based on the minimum date in the visual or a slicer.
COUNTROWS(
GROUPBY(FILTER(Table,Table[First Sample Date]>= CALCULATE(min('Calendar'[DATE]),ALLSELECTED('Calendar'[DATE])),Table[Sample ID],Table[Order Choice Type])
)
Below are screenshots of the baseline (with the expected values) as well as the incorrect values based on my failed attempt.
Any help is appreciated!
Solved! Go to Solution.
@Anonymous , Try like
New=
var _min = minx(allselected('Calendar') ,'Calendar'[DATE])
return
calculate(COUNTROWS(Summarize(Table, Table[Sample ID],Table[Order Choice Type])),FILTER(Table,Table[First Sample Date]>= _min)
)
or
New=
var _min = minx(allselected('Calendar') ,'Calendar'[DATE])
return
calculate(COUNTROWS(Summarize(Table, Table[Sample ID],Table[Order Choice Type])),FILTER(all(Table),Table[First Sample Date]>= _min)
)
@Anonymous , Try like
New=
var _min = minx(allselected('Calendar') ,'Calendar'[DATE])
return
calculate(COUNTROWS(Summarize(Table, Table[Sample ID],Table[Order Choice Type])),FILTER(Table,Table[First Sample Date]>= _min)
)
or
New=
var _min = minx(allselected('Calendar') ,'Calendar'[DATE])
return
calculate(COUNTROWS(Summarize(Table, Table[Sample ID],Table[Order Choice Type])),FILTER(all(Table),Table[First Sample Date]>= _min)
)
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
23 | |
16 | |
15 | |
7 | |
6 |
User | Count |
---|---|
33 | |
29 | |
16 | |
13 | |
12 |