Hello,
I am trying to make an app for customer support. My database like:
Customer Name (using ref) Date Service type
DMCH 01/Jan/2020 Maintenance
DMCH 01/Mar/2020 Repair
DMCH 01/Aug/2020 Repair
ABCD 01/Mar/2020 Maintenance
ABCD 01/May/2020 Maintenance
ABCD 01/Jul/2020 Repair
XYZ 01/Mar/2020 Reaper
XYZ 01/May/2020 Maintenance
XYZ 01/Aug/2020 Maintenance
Now I want to make a slice in which the customer does not get any service in the last 2 months.
Try:
([Date] < (EOMONTH(TODAY(), -3) + DAY(TODAY())))
EOMONTH(TODAY(), 0)
is the date of the last day of this month.
EOMONTH(TODAY(), -1)
is the last day of last month.
EOMONTH(TODAY(), -1) + DAY(TODAY())
is todayโs date.
EOMONTH(TODAY(), -2) + DAY(TODAY())
is one month ago today.
EOMONTH(TODAY(), -3) + DAY(TODAY())
is two months ago today.
See also:
Thanks for your support,but I am trying
([Date] < (EOMONTH(TODAY(), -3) + DAY(TODAY()))) then its showing all history without last two month like:
My orginal database:
DMCH -----01/Jan/2020 -----Maintenance
DMCH -----01/Mar/2020 -----Repair
DMCH -----01/Aug/2020 -----Repair
ABCD -----01/Mar/2020 -------Maintenance
ABCD -----01/May/2020 ------Maintenance
ABCD -----01/Jul/2020 --------Repair
XYZ --------01/Mar/2020------ Reaper
XYZ --------01/May/2020------ Maintenance
XYZ --------01/Aug/2020 ------Maintenance
After applying filter on slice its showing:
DMCH -----01/Mar/2020 -----Repair
ABCD -----01/Mar/2020 -------Maintenance
ABCD -----01/May/2020 ------Maintenance
XYZ --------01/Mar/2020------ Reaper
XYZ --------01/May/2020------ Maintenance
now I want: let XYZ get any service in last two month,then this customer all history hide from slice,only showing that customer history which are not get any service last two month.
thanks.
Try this:
AND(
(
[Date]
= MAX(
SELECT(
table[Date],
([_THISROW].[Customer Name] = [Customer Name])
)
)
),
(
[Date]
< (
EOMONTH(TODAY(), -3)
+ DAY(TODAY())
)
)
)
User | Count |
---|---|
44 | |
29 | |
23 | |
20 | |
15 |