Forum Discussion
jojo54
7 years agoFrequent Visitor
Start and end time
Hi there, pretty new to Power BI. I'm trying to replicate something I do in Excel in Power BI, mainly because excel can't handle the amount of data that's being processed. I'm trying to figure o...
- 7 years ago
Hi jojo54
See if the following can fix it for what you need
Number of clients 2 = VAR vMinVal = MIN ( TimeTable[Value] ) VAR vMaxVal = MAX ( TimeTable[Value] ) VAR vNumberOfClients = COUNTROWS ( FILTER ( ALLSELECTED ( ClientsTbl ), ClientsTbl[Entry Time] <= vMinVal && ClientsTbl[Exit Time] >= vMaxVal ) ) RETURN vNumberOfClientsWhenever I have more time I could think of something better.
Geradav
Responsive Resident
7 years agoHi jojo54
See if the following can fix it for what you need
Number of clients 2 =
VAR vMinVal =
MIN ( TimeTable[Value] )
VAR vMaxVal =
MAX ( TimeTable[Value] )
VAR vNumberOfClients =
COUNTROWS (
FILTER (
ALLSELECTED ( ClientsTbl ),
ClientsTbl[Entry Time] <= vMinVal
&& ClientsTbl[Exit Time] >= vMaxVal
)
)
RETURN
vNumberOfClients
Whenever I have more time I could think of something better.
samsaralamb
5 years agoRegular Visitor
Hi Geradav, seems your solution is based on one date. If there are multiple days, may I ask how to handle it? Thanks!
- Geradav5 years ago
Responsive Resident
Hi samsaralamb ,
If I understood you correctly, instead of using a time table (with only time values) you could have a table that uses date and time values, so you can obtain frequence over multiple days