Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi community,
I'm trying to sum up a measure calculated with a minimum statement. The measure and the other field are:
[PESO RC *]= {MIN({<[PRO Linea Proceso]={'3320','3340'}>}[PRO PESO RC])
[PESO LC]=[PESO LC] //field in one of the charts from the script
And then, I want to sum the following:
sum([PESO LC]-[PESO RC *])
And it gives me an error as not recognizing the measure [PESO RC *]
Please help!!!
Hi @AidaAR ,
Is this measure created in front end as a Master Measure or something ?, If that's the case then, you will have to use aggr function to calculate nested aggregations. so something like :
sum( aggr(max([PESO LC]),Key_field) - aggr(MIN({<[PRO Linea Proceso]={'3320','3340'}>}[PRO PESO RC]) ,Key_field))
Try it out & let me know if it works for you.
Regards,
Rohan.
Hi @AidaAR ,
Is this measure created in front end as a Master Measure or something ?, If that's the case then, you will have to use aggr function to calculate nested aggregations. so something like :
sum( aggr(max([PESO LC]),Key_field) - aggr(MIN({<[PRO Linea Proceso]={'3320','3340'}>}[PRO PESO RC]) ,Key_field))
Try it out & let me know if it works for you.
Regards,
Rohan.
Yes! It works! Thank you very much!
Hi @AidaAR,
Check this:
Sum(
Aggr(
[PESO LC] - min({<[PRO Linea Proceso]={'3320','3340'}>} [PRO PESO RC]),
[YourDimensions]
)
)