Supplies are limited. Contact info@espc.tech right away to save your spot before the conference sells out.
Get your discountScore big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount
Hi @Techyy55 ,
Please create a Dimdate to help your calculation.
DimDate =
ADDCOLUMNS (
CALENDARAUTO (),
"Year", YEAR ( [Date] ),
"Month", MONTH ( [Date] ),
"Day", DAY ( [Date] ),
"YearMonth",
YEAR ( [Date] ) * 100
+ MONTH ( [Date] )
)
Data model:
Measure:
Select Date =
CALCULATE(SUM('Table'[Value]))
Delta Inventory Value =
VAR _SELECTMONTH=SELECTEDVALUE(DimDate[Month])
VAR _SELECTDAY = SELECTEDVALUE(DimDate[Day])
RETURN
IF(_SELECTMONTH = 2 && _SELECTDAY = 29,BLANK(),CALCULATE([Select Date],SAMEPERIODLASTYEAR(DimDate[Date])))
Result is as below.
Best Regards,
Rico Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi,
If today was Feb 29, 2024, then with which date of the previous year would you want to compare the inventory value of today? Also, is there an inventory value for each day of 2022 and 2023?
If today is Feb 29, 2024 then i want to compare the inventory value on Feb 29, 2023. No, the inventory value is not for each day.
Hi @Techyy55 ,
Please create a Dimdate to help your calculation.
DimDate =
ADDCOLUMNS (
CALENDARAUTO (),
"Year", YEAR ( [Date] ),
"Month", MONTH ( [Date] ),
"Day", DAY ( [Date] ),
"YearMonth",
YEAR ( [Date] ) * 100
+ MONTH ( [Date] )
)
Data model:
Measure:
Select Date =
CALCULATE(SUM('Table'[Value]))
Delta Inventory Value =
VAR _SELECTMONTH=SELECTEDVALUE(DimDate[Month])
VAR _SELECTDAY = SELECTEDVALUE(DimDate[Day])
RETURN
IF(_SELECTMONTH = 2 && _SELECTDAY = 29,BLANK(),CALCULATE([Select Date],SAMEPERIODLASTYEAR(DimDate[Date])))
Result is as below.
Best Regards,
Rico Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Feb 2023 has 28 days. Now what? Share some data to work with and show the expected result.
User | Count |
---|---|
66 | |
60 | |
47 | |
33 | |
32 |
User | Count |
---|---|
86 | |
75 | |
56 | |
50 | |
45 |