Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi guys,
is there a way to have the total count of a field with two condition based on another filtered field and that doesn't change adding other filters? Maybe it's easier to understand with an example:
I have 12 fields named "ANNO_MESE" for each month of the year in this format "201609, 201610" etc
I have a field named "COD_CLASSE_STRUMENTO" with 3 possible values for each type of the field "ID_SITO": "INT", "XXX", "ORA".
I'd like to have the counter (or an expression in chart) of the field "ID_SITO" that always gives me the total of the field "COD_CLASSE_STRUMENTO" but only of the type "INT" and "XXX" (all but "ORA") and that doesn't change if i add other filters, so is basically the count of the "INT" + "XXX" ID_SITO for a determined month of the year ("ANNO_MESE").
I hope to have been as thorough as possible in explaining my need.
N.B. I can't work on the scritp and i can't upload the file because i'm using a shared document.
Thanks in advance,
Andrea
Hi Sunny!
I just added "1" at the beginning of the first expression you posted and it works perfectly, you can see it below:
Count({1<COD_CLASSE_STRUMENTO={'XXX','INT'}, ANNO_MESE = P(ANNO_MESE)>} ID_SITO)
Thank you very much for your precious help!
Andrea
Bit confusing, what was the problem
Count({<type= {'int'}, ANNO_MESE=>} ID_SITO) + Count({<type= {'xxx'}, ANNO_MESE=>} ID_SITO)
Hi Anil,
first of all, thank you for helping me. I tried your solution but i didn't get the result i was searching for.
Starting from your advice, i took a step forward because i managed to get this expression:
count({1<COD_CLASSE_STRUMENTO={'XXX','INT'}, ANNO_MESE>} ID_SITO)
I inserted it in a pivot chart and i got the total from every "ANNO_MESE" despite subsequent selections. What i need now is the total from the only "ANNO_MESE" selected, take a look at the screenshot below (I highlighted the selected value and the result i'd like to have displayed):
Any advices to complete the task?
Thanks everybody.
Andrea
I guess don't ignore all selections (using 1) and selection in ANNO_MESE
Count({<COD_CLASSE_STRUMENTO={'XXX','INT'}>} ID_SITO)
or if you want to ignore all selection, but allow selection in ANNO_MESE, then try this
Count({<COD_CLASSE_STRUMENTO={'XXX','INT'}, ANNO_MESE = P(ANNO_MESE)>} ID_SITO)
or
Count({<COD_CLASSE_STRUMENTO={'XXX','INT'}, ANNO_MESE = $::ANNO_MESE>} ID_SITO)
Hi Sunny!
I just added "1" at the beginning of the first expression you posted and it works perfectly, you can see it below:
Count({1<COD_CLASSE_STRUMENTO={'XXX','INT'}, ANNO_MESE = P(ANNO_MESE)>} ID_SITO)
Thank you very much for your precious help!
Andrea
Awesome!!
I am glad we were able to resolve this.
Best,
Sunny