Hi Guys,
I am back again.
Got some issues that i really need help with.
-
I have a day range that i created in my Tabular Cube.
Premium In Days: = CALCULATE([Total Premium], FILTER('Date', 'Date'[Date]> TODAY() - [Days Range] && 'Date'[Date] <= TODAY()))
How ever, i want to replace the Today() in the filter context to the last day of the previous month. i tried to use EOmonth but is giving me a wrong year ( 12-04-2015). I need it to look like the below
Premium In Days: = CALCULATE([Total Premium],
FILTER('Date',
'Date'[Date]> 31-05-2020 - [Days Range] && 'Date'[Date] <= 31-05-2020)) dynamically as that is the last day when the data were process
- I have created a banding simply to what i have seen in the past
= DATATABLE(“Banding”, STRING,
“Min”,INTEGER, “Max”,INTEGER, {
{“0 - 250K”,0,250000},
{“250k - 500K”,250001,500000},
{“500k - 750K”,500001,750000},
{“750k - 1M”,750001,1000000},
{“Above 1M”,1000001,9000000000}
however, when i calculate the banding by state it works as seen below
Tiv Banding Group: = CALCULATE( [TIV],
FILTER(VALUES('Property'[State]),
COUNTROWS(
FILTER('Tiv Banding',
[TIV] >= 'Tiv Banding'[Min] &&
[TIV]< 'Tiv Banding'[Max]))>0))
but when i want to calculate the TIV or Premium by each banding i am getting wrong figures
below is what i am doing for the above
Premium Banding Group: = CALCULATE( [Total Premium],
FILTER(VALUES('Tiv Banding'),
COUNTROWS(
FILTER('Tiv Banding',
[Total Premium] >= 'Tiv Banding'[Min] &&
[Total Premium]< 'Tiv Banding'[Max]))>0))
Total premium is calculated this way
Sum ( Actual Premium )
All i want to achieve is for each banding group, calculate the premium
Any helps will be much appreciated