Forum Discussion
Boolean statement if item exists between tow dates
- 5 years ago
xonder , Create a measure like this and try with ID
measure =
var _max = maxx(allselected(Table), Table[Date])
var _tab =summarize(filter(Table, Table[Date] =_max),Table[ID])
return
calculate( count(Table[ID]), filter( Table, Table[Date] <_max && not(Table[ID] in _tab))) - 5 years ago
Hi xonder ,
You can create two measure for counting ID that are marked "Sold" and those marked "For Sale":
ID For Sale = CALCULATE(COUNT('Table'[ID]),FILTER('Table',[Status] = "For Sale")) ID Sold = CALCULATE(COUNT('Table'[ID]),FILTER('Table',[Status] = "Sold"))Put them in values and it will show as legends.
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Best Regards,
Dedmon Dai
Hi amitchandak and AlB
I have made some progress.
I have created a the follwing measure
Status = IF(MAXX(azw,azw[date])< LASTDATE(ALL(azw[date])), "Sold", "For Sale")
That allows me to get the current status of each ID as shown below.
However, I can't seem to use the measure "Status" in a chart as an Axis or Legend.
How can I use this measure to show the number (COUNT) of ID that are marked "Sold" and those marked "For Sale"?
Thank you!!