Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
Hi,
I am having diffuclty with the count of occupacy. My table is now showing the correct value after using both measures below. WHen I use the same measure in a card view it has a differnt value which is not correct.
Any help would be much appreciated.
Thank you 😊
Measures are as follows:
@KAZ , Assume you have active join between Arrival date and date of date table
and change the measure like and try
Occupancy5 =
VAR EndDatePerVisual =
MAX ( 'Dates'[Date] )
VAR StartDatePerVisual =
MIN ( 'Dates'[Date] )
VAR RESULT =
calculate(Sumx (filter( Reservations
Reservations[DateArrive] <= EndDatePerVisual,
(Reservations[DateDepart] > StartDatePerVisual
|| ISBLANK ( Reservations[DateDepart] ))
),
[Number of rooms checked in]), crossfilter( 'Dates'[Date],Reservations[DateArrive] , none))
RETURN
RESULT
User | Count |
---|---|
84 | |
79 | |
71 | |
48 | |
43 |
User | Count |
---|---|
111 | |
54 | |
50 | |
40 | |
40 |