Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
hi All,
I wanted to take data whose expire date is greater than today().
I use from following code
One:
LOAD [Campaign Id],
[Batch Id],
[Start Date],
[Exp Date]
FROM
(
but now I want to show data of 3 expire date of today in pivot or metric. Could anyone explain me how to do it?
do we have any good process than what I did here?
Thanks in adv.
May be like this
Dimension
Batch Id
Campaign Id
Exp Date
Expression
Date(Only({<[Start Date] = {"$(='<=' & Date(Min([Start Date], 3), 'DD/MM/YYYY'))"}>} [Start Date]))
Updated the expression and attached a sample
You can use those Dates as Static in pivot expression
Sum({<[Exp Date = {'Date1','Date2','Date3'}]>}Sales)
now I want to show data of 3 expire date of today in pivot or metric.
3 expire date of today? What do you mean? Do you mean the campaign id which is within 3 days from today?
Do you mean this?
count({<[Exp Date] = {"<=$(=date(today()-3))"}>}Campaign Id)
Adam I think there is a typo in your and Anil's expression
Sum({<[Exp Date = {"<=$(=date(today()-3))"}]>}Sales)
Should be this
Sum({<[Exp Date] = {"<=$(=date(today()-3))"}>}Sales)
sorry typing too quick, corrected it
I have data after reload
Batch Id | Campaign Id | Start Date | Exp Date |
212 | 817171 | 14/03/2023 | 14/02/2024 |
217 | 896343 | 17/08/2020 | 17/07/2021 |
226 | 845697 | 30/09/2019 | 30/08/2020 |
239 | 848442 | 05/12/2023 | 05/11/2024 |
241 | 874978 | 14/04/2022 | 14/03/2023 |
I want answer
Batch Id | Campaign Id | Start Date | Exp Date |
226 | 845697 | 30/09/2019 | 30/08/2020 |
217 | 896343 | 17/08/2020 | 17/07/2021 |
241 | 874978 | 14/04/2022 | 14/03/2023 |
May be like this
Dimension
Batch Id
Campaign Id
Exp Date
Expression
Date(Only({<[Start Date] = {"$(='<=' & Date(Min([Start Date], 3), 'DD/MM/YYYY'))"}>} [Start Date]))
Updated the expression and attached a sample
Thanks all of you ...