Forum Discussion
Filtering with a Summed column
- 8 years ago
Hi knightkblack,
I made same update to my sample data by adding a column of date, and you can refer to the following steps to get the result as we excepetd..
1. Create a calculated column using the formula.
milelastweek1 = CALCULATE(SUM(Table1[E Miles])+SUM(Table1[LD Miles]),FILTER(ALL(Table1),Table1[date]<=TODAY() && Table1[date]>=TODAY()-7 && Table1[Truck#]= EARLIER(Table1[Truck#])))
2. Create a measure to get the count of Truck that meet the requirement.
countdis = CALCULATE(DISTINCTCOUNT(Table1[Truck#]),FILTER(Table1,Table1[milelastweek1]>2000))
For more details, please check the pbix as attached. If it doesn't meet your requirement, kindly share your pbix to me.
https://www.dropbox.com/s/hqepgid4v5edlup/Filtering%20with%20a%20Summed%20column.pbix?dl=0
Regards,
Frank
Hi knightkblack,
I made same update to my sample data by adding a column of date, and you can refer to the following steps to get the result as we excepetd..
1. Create a calculated column using the formula.
milelastweek1 = CALCULATE(SUM(Table1[E Miles])+SUM(Table1[LD Miles]),FILTER(ALL(Table1),Table1[date]<=TODAY() && Table1[date]>=TODAY()-7 && Table1[Truck#]= EARLIER(Table1[Truck#])))
2. Create a measure to get the count of Truck that meet the requirement.
countdis = CALCULATE(DISTINCTCOUNT(Table1[Truck#]),FILTER(Table1,Table1[milelastweek1]>2000))
For more details, please check the pbix as attached. If it doesn't meet your requirement, kindly share your pbix to me.
https://www.dropbox.com/s/hqepgid4v5edlup/Filtering%20with%20a%20Summed%20column.pbix?dl=0
Regards,
Frank
Hi knightkblack,
Does that make sense? If so, kindly mark my answer as a solution to close the case.
Regards,
Frank