Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
I'm working with two stacked bar charts: one for absolute values, other for relative values.
The dimension is weeks for both of them (field name:AllocTransfInsDateWeek) . When working with the app, the user may want to analyse a specific week different from the current, but for these charts, the requirement is that they keep showing the whole year.
For the first one (abs values) I've used the expression bellow, and when selecting one specif week it keeps showing the whole year.
=Count({<AllocTransfMktComm*=-{"POSTPONE UNUSUED ALOCATION"}, AllocTransfOrigMillCd={'ATF'},AllocTransfTransfStat*=-{"CANCEL"},AllocTransfInsDateYear={"$(=Year(Today()))"}, AllocTransfInsDateWeek={<=$(=vCurrentInsDateWeek)"}>}AllocTransfAllocTransfId)
However, for the relative values chart, when selecting one specif week it shows only that week. The expression I'm using is this:
=count({<AllocTransfMktComm*=-{"POSTPONE UNUSUED ALOCATION"}, AllocTransfOrigMillCd={'ATF'}, AllocTransfTransfStat*=-{"CANCEL"},AllocTransfInsDateYear={"$(=Year(Today()))"}, AllocTransfInsDateWeek={"<=$(=vCurrentInsDateWeek)"}>}AllocTransfAllocTransfId) / aggr(NODISTINCT count({<AllocTransfMktComm*=-{"POSTPONE UNUSUED ALOCATION"}, AllocTransfOrigMillCd={'ATF'},AllocTransfTransfStat*=-{"CANCEL"},AllocTransfInsDateYear={"$(=Year(Today()))"}, AllocTransfInsDateWeek={"<=$(=vCurrentInsDateWeek)"}>}AllocTransfAllocTransfId),AllocTransfInsDateWeek)
I've already tried to add a set modifier = 1 but nothing happened. Do you have any idea what I might be doing wrong or how can I solve this?
thank you very much,
Sofia
Try this
=Count({<AllocTransfMktComm *= -{"POSTPONE UNUSUED ALOCATION"}, AllocTransfOrigMillCd = {'ATF'}, AllocTransfTransfStat *= -{"CANCEL"}, AllocTransfInsDateYear = {"$(=Year(Today()))"}, AllocTransfInsDateWeek = {"<=$(=vCurrentInsDateWeek)"}>} AllocTransfAllocTransfId)
/
Only({<AllocTransfMktComm*=-{"POSTPONE UNUSUED ALOCATION"}, AllocTransfOrigMillCd={'ATF'}, AllocTransfTransfStat*=-{"CANCEL"},AllocTransfInsDateYear={"$(=Year(Today()))"}, AllocTransfInsDateWeek={"<=$(=vCurrentInsDateWeek)"}>} Aggr(NODISTINCT Count({<AllocTransfMktComm*=-{"POSTPONE UNUSUED ALOCATION"}, AllocTransfOrigMillCd={'ATF'}, AllocTransfTransfStat*=-{"CANCEL"},AllocTransfInsDateYear={"$(=Year(Today()))"}, AllocTransfInsDateWeek={"<=$(=vCurrentInsDateWeek)"}>}AllocTransfAllocTransfId), AllocTransfInsDateWeek))
Try this
=Count({<AllocTransfMktComm *= -{"POSTPONE UNUSUED ALOCATION"}, AllocTransfOrigMillCd = {'ATF'}, AllocTransfTransfStat *= -{"CANCEL"}, AllocTransfInsDateYear = {"$(=Year(Today()))"}, AllocTransfInsDateWeek = {"<=$(=vCurrentInsDateWeek)"}>} AllocTransfAllocTransfId)
/
Only({<AllocTransfMktComm*=-{"POSTPONE UNUSUED ALOCATION"}, AllocTransfOrigMillCd={'ATF'}, AllocTransfTransfStat*=-{"CANCEL"},AllocTransfInsDateYear={"$(=Year(Today()))"}, AllocTransfInsDateWeek={"<=$(=vCurrentInsDateWeek)"}>} Aggr(NODISTINCT Count({<AllocTransfMktComm*=-{"POSTPONE UNUSUED ALOCATION"}, AllocTransfOrigMillCd={'ATF'}, AllocTransfTransfStat*=-{"CANCEL"},AllocTransfInsDateYear={"$(=Year(Today()))"}, AllocTransfInsDateWeek={"<=$(=vCurrentInsDateWeek)"}>}AllocTransfAllocTransfId), AllocTransfInsDateWeek))
Thank you Sunny, it works!