Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello all!
I am trying to get the share of the most used "notif_mode_of_operation_description" in my list of " key_notificationno " and this by "Plant Description" in my table.
While the Mode(notif_mode_of_operation_description) column and the count( key_notificationno ) are giving expected results, the middle one seems not to give expected results, here is the current formula :
count( {<notif_mode_of_operation_description={$(=Mode(notif_mode_of_operation_description))}>} key_notificationno)
Instead of showing the result of the mode of the line itself, it shows the result for the whole selection (Maintenance in our case), ignoring the Plant Description it is supposed to refer to... ( First line is ok because the "mode" is Maintenance as well but second line should show something close to 10000 if it was taking the right value)
I tried many things always coming to this result, am I missing something?
Thanks,
It's not solvable with a set analysis else it needs an if-loop to consider the dimensionality of the object, like:
if(notif_mode_of_operation_description =
Mode(notif_mode_of_operation_description),
count(key_notificationno))
Hello Marcus,
Thanks, it guided me towards correct answer : what ended up working was :
sum(aggr(
if(notif_mode_of_operation_description =
Mode(total<[Plant Description]> notif_mode_of_operation_description),
count(key_notificationno))
,[Plant Description],key_notificationno))
Try this
Count({<notif_mode_of_operation_description = {$(=Mode(Aggr(notif_mode_of_operation_description, [Plant Description])))}>} key_notificationno)
Thanks for your answer! sadly it did not work (showing 0 as result), I tried as well with Mode inside of aggr but same result... any other idea?
Try this
Count({<notif_mode_of_operation_description = {"=$(=Mode(Aggr(notif_mode_of_operation_description, [Plant Description])))"}>} key_notificationno)
Hello, it still gives 0 ... I tried many things with the AGGR, most of them gives 0, and when it does not, it comes back to initial result, as if "Maintenance" was most frequent for all plants.
Funny thing :
count( {<notif_mode_of_operation_description={"$(=maxstring(Aggr(mode(notif_mode_of_operation_description), [Plant Description])))"}>} key_notificationno)
gives as if "Maintenance" is the most common for all plants and place it for all, and
count( {<notif_mode_of_operation_description={"$(=minstring(Aggr(mode(notif_mode_of_operation_description), [Plant Description])))"}>} key_notificationno)
gives as if "In service - Manual Driving" was the most common for all plant and applies its value. So I know both values are captured, I just can't manage to single them line by line (plant by plant)
It's not solvable with a set analysis else it needs an if-loop to consider the dimensionality of the object, like:
if(notif_mode_of_operation_description =
Mode(notif_mode_of_operation_description),
count(key_notificationno))
Hello Marcus,
Thanks, it guided me towards correct answer : what ended up working was :
sum(aggr(
if(notif_mode_of_operation_description =
Mode(total<[Plant Description]> notif_mode_of_operation_description),
count(key_notificationno))
,[Plant Description],key_notificationno))