Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi. I Want to create a set-expression which calculates the availability for current year.
The rental appartments could have different status: "available", "not available", "temp.blocked". I want to count nr of available in % to the total.
Table looks like:
Available date: Item nr Status
2019-01-01 24248 Avaiblable
2019-01-01 23234 Not available
I have tried with : Count({$<$(vL.CY)>}[Status]='AVA')/Count(TOTAL {$<$(vL.CY)>}[Status])
But not giving right numbers..
variable vL.CY is like this:
[Availability Date.autoCalendar.Year]={"$(=Date(Today(), 'YYYY'))"}
Try this
Count({$<$(vL.CY, Status = {'AVA'}>}[Status])/Count({$<$(vL.CY)>}[Status])
Assuming the value is AVA, but if it Available, try this
Count({$<$(vL.CY, Status = {'Available'}>}[Status])/Count({$<$(vL.CY)>}[Status])
Hi. Gives error in syntax...
Works with the syntax but giving the wrong result. (shows 0). Should be more than 20 %.
Sorry, my bad, try this
Count({$<$(vL.CY), Status = {'AVA'}>}[Status])/Count({$<$(vL.CY)>}[Status])
or this
Count({$<$(vL.CY), Status = {'Available'}>}[Status])/Count({$<$(vL.CY)>}[Status])