Forum Discussion
PowerQ12
2 years agoNew Member
Help with MIN & MAX Commands
I'm hoping for a bit of guidance as I'm struggling to get a meaninful result. I have my data set out below: Claim Reference Insured Incurred Reporting Period Max Date Min Date CL9...
Jihwan_Kim
Super User
2 years agoHi,
I am not sure if I understood your question correctly, but please check the below picture and the attached pbix file.
I tried to create a sample pbix file like below.
Expected result measure: =
VAR _mindatevalue =
CALCULATE (
SUM ( Data[Incurred] ),
WINDOW (
1,
ABS,
1,
ABS,
SUMMARIZE ( Data, Data[Claim Reference], Data[Insured], Data[Reporting Period] ),
ORDERBY ( Data[Reporting Period] ),
,
PARTITIONBY ( Data[Claim Reference], Data[Insured] )
)
)
VAR _maxdatevalue =
CALCULATE (
SUM ( Data[Incurred] ),
WINDOW (
-1,
ABS,
-1,
ABS,
SUMMARIZE ( Data, Data[Claim Reference], Data[Insured], Data[Reporting Period] ),
ORDERBY ( Data[Reporting Period] ),
,
PARTITIONBY ( Data[Claim Reference], Data[Insured] )
)
)
RETURN
_maxdatevalue - _mindatevalue
- PowerQ122 years agoNew Member
This is great, thank you so much for this. This is exactly what I was looking for.
Is there a way to use this Measure to work out a % accuracy value and aggregate this as an overall figure per reporting period?
thanks again!
- Jihwan_Kim2 years ago
Super User
Hi,
Please provide your sample pbix file with describing how the expected outcome looks like.
And then I can try to look into it.
Thank you.