Forum Discussion
Tabular Model: I am trying to create a Measure or Calculated column that holds the selected Period
Hi Aks-1 ,
You can get cumulative value in the range of slicer using DAX below.
Measure1=
Var FromDate = CALCULATE(MIN(Slicer[Date]),ALLSELECTED(Slicer[Date]))
Var ToDate = CALCULATE(MAX(Slicer[Date]),ALLSELECTED(Slicer[Date]))
Return
CALCULATE(SUM(Table1[sales]), FILTER(ALLSELECTED(Table1), Table1[Date]>=FromDate &&Table1[Date]<=ToDate))
If I misunderstood it, could you please share your sample data and desired output screenshots for further analysis? You can also upload sample pbix to OneDrive and post the link here. Do mask sensitive data before uploading.
Please read this post to get your answer quickly: How to Get Your Question Answered Quickly.
Best Regards,
Amy
Community Support Team _ Amy
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi v-xicai ,
That didn't work.What I am tyring is to calculate a Measure that holds Inception to date, losses depending on selected selected attribute, in my case it is Loss year.
This should do the trick but does consider the loss year.
VAR MaxDate = MAX (DimDate[Date] )
RETURN
if( ISBLANK( CALCULATE (
SUM(LossTriangle_POC[WINS_Medical_Paid]),
DimDate[Date]<= MaxDate,
ALL ( DimDate[Date])
)) , 0 , CALCULATE (
SUM(LossTriangle_POC[WINS_Medical_Paid]),
DimDate[Date]<= MaxDate,
ALL ( DimDate) ))
Any help highly appreciated.
Thanks.