Forum Discussion
hanyfouda2023
2 years agoHelper II
Days Vending machine non operating
Hi helpers, I have list of vending machines & database is contains Master tables for serial numbers & Sales tables contains "Sales , Qty" I'm facing an issue that if one vending machine doesnt wor...
- 2 years ago
please follow these steps :
step 1
create datetable table :
datetable = CALENDAR(MIN(transactions[Date ]), MAX(transactions[Date ]))
sample data used :step 2 :link datetable new the transaction table via date column.step3 : create this measure :
non working days =var dates = ALL(datetable[Date])var available_dates =CALCULATETABLE(VALUES(transactions[Date ]),ALLSELECTED(datetable[Date]))var result =EXCEPT(dates,available_dates)returnCALCULATE(COUNTROWS(datetable),KEEPFILTERS(result))step 4 : create the visualdrag the following columns the visual .
final result :
this will gives the non working hours per #serial .hope this helps .
best regards
Daniel29195
2 years agoCommunity Champion
please follow these steps :
step 1
create datetable table :
datetable = CALENDAR(MIN(transactions[Date ]), MAX(transactions[Date ]))
sample data used :
sample data used :
step 2 :
link datetable new the transaction table via date column.
step3 : create this measure :
non working days =
var dates = ALL(datetable[Date])
var available_dates =
CALCULATETABLE(
VALUES(transactions[Date ]),
ALLSELECTED(datetable[Date])
)
var result =
EXCEPT(
dates,
available_dates
)
return
CALCULATE(
COUNTROWS(datetable),
KEEPFILTERS(result)
)
step 4 : create the visual
drag the following columns the visual .
final result :
this will gives the non working hours per #serial .
hope this helps .
best regards
hanyfouda2023
2 years agoHelper II
Thanks Alot for your support , it works fine!