Supplies are limited. Contact info@espc.tech right away to save your spot before the conference sells out.
Get your discountScore big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount
Hi All,
I'm looking for a if and time dax statement that gives me the total count of rows in Table[Order Time] that are less than 10am as "breakfast" and greater than 10 as "Lunch".
Thank you in advance!
breakfast =
CALCULATE (
COUNTROWS ( 'fact' ),
FILTER (
'fact',
TIMEVALUE ( CALCULATE ( MAX ( 'fact'[Value] ) ) ) <= TIME ( 10, 00, 00 )
)
)
lunch =
CALCULATE (
COUNTROWS ( 'fact' ),
FILTER (
'fact',
TIMEVALUE ( CALCULATE ( MAX ( 'fact'[Value] ) ) ) > TIME ( 10, 00, 00 )
)
)
@am_i_really Try:
Breakfast =
VAR __Table = ADDCOLUMNS('Table',"__Hour",HOUR([Order Time]))
VAR __Result = COUNTROWS(FILTER(__Table,[__Hour] < 10))
RETURN
__Result
Lunch =
VAR __Table = ADDCOLUMNS('Table',"__Hour",HOUR([Order Time]))
VAR __Result = COUNTROWS(FILTER(__Table,[__Hour] >= 10))
RETURN
__Result
User | Count |
---|---|
14 | |
9 | |
8 | |
7 | |
5 |
User | Count |
---|---|
24 | |
16 | |
15 | |
10 | |
7 |