Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I have data on various months and I need to be able to select two different months and get the percentage difference between the two. So for February, I have 43% and for March I have 50% so I need to see that the difference is 15.05% but I"m not sure how to do that. Currently to calculate the percentage per month I use:
Count({<[UMHC SYSTEM]={"100%"},[EC-LS-EM]={'EC'}>}[UMHC SYSTEM])/Count({<[EC-LS-EM]= {'EC'}>}[UMHC SYSTEM])
I tried adding Min & MaxString but that's not working.
Thank you!
Try this
(
Count({<[UMHC SYSTEM]={'<.81'},[EC-LS-EM]= {'EC'}, Month = {"$(=MaxString(Month))"}>} [UMHC SYSTEM])/16
)
/
(
Count({<[EC-LS-EM]= {'EC'}>} EP#) / (16 * count({<Date={'<=$(=today())'}>}distinct Month))
)
pl post a sample
But I thought it did work yesterday?
Hey Sunny, it is working for the KPI, but I'm trying to use another way also. They like to view the information in many different ways. So I'm trying to:
Count The number of standards within the max month (which you showed me yesterday):
Count({<[UMHC SYSTEM]={'<.81'},[EC-LS-EM]= {'EC'}, Month = {"$(=MaxString(Month))"}>} [UMHC SYSTEM])
Then divide that by the count of standards all together:
Count({<[EC-LS-EM]= {'EC'}>} EP#) / (16 * count({<Date={'<=$(=today())'}>}distinct Month))
So what I need to do it put them together so I can show the difference.
Then divide that by the count of standards all together.
Assume I don't know what this means, can you expand on this a little to help you better?
Hey Sunny,
So when I do that and divide by all the standards I get the wrong total.
Count The number of standards within the max month (which you showed me yesterday):
Count({<[UMHC SYSTEM]={'<.81'},[EC-LS-EM]= {'EC'}, Month = {"$(=MaxString(Month))"}>} [UMHC SYSTEM])/16
This equals 87
Then divide that by the count of standards all together:
Count({<[EC-LS-EM]= {'EC'}>} EP#) / (16 * count({<Date={'<=$(=today())'}>}distinct Month))
This equals 188
So then 87/188 is 46% which is the right amount, but when I put the expression altogether and divide it by the count of all standards I get 3%. So I think I am putting it together incorrectly.
Does that make more sense?
Try this
(
Count({<[UMHC SYSTEM]={'<.81'},[EC-LS-EM]= {'EC'}, Month = {"$(=MaxString(Month))"}>} [UMHC SYSTEM])/16
)
/
(
Count({<[EC-LS-EM]= {'EC'}>} EP#) / (16 * count({<Date={'<=$(=today())'}>}distinct Month))
)
That's what I was missing, the ( ) to break it up.
Thanks Sunny, now I should be able to continue building.
Have a wonderful day!