Forum Discussion
HKInd
3 years agoHelper I
WeekEnding date slicer
I have below data set:- Table Name:- Order data Country City Date Order Rate Total Cost Country1 City1 7/1/2023 18 216 3888 Country2 City2 7/2/2023 27 191 5157 Country3 ...
- 3 years ago
Nithinr Thanks for your quick help on this:-
I have to apply one more condition like : order >50Monday_cost =CALCULATE(SUM('Order data'[Total Cost]),FILTER('Order data','Order data'[Weekday]=2),FILTER('Order data','Order data'[Order]<50))It is providing correct answer but any other better way
Nithinr
3 years agoResolver III
Create Another column weekday in calendar table
weekday = WEEKDAY('Date Calendar'[Date],2) , Create a relationship between order data and calendar table with date column. Tweak the measures to use weekday column . you can select multiple weekend dates and get sum of those weekdays you want. weekday= 1-monday,2-tuesday,3-wednesday .....
Monday_cost =
CALCULATE(SUM('Table'[Total Cost]),FILTER('Date Calendar','Date Calendar'[weekday]=1))
HKInd
3 years agoHelper I
Nithinr Thanks for your quick help on this:-
I have to apply one more condition like : order >50
Monday_cost =
CALCULATE(SUM('Order data'[Total Cost]),FILTER('Order data','Order data'[Weekday]=2),FILTER('Order data','Order data'[Order]<50))
It is providing correct answer but any other better way