Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I have data as per below
Month | Data |
Jan | 20 |
Feb | 10 |
Mar | 30 |
Apr | 50 |
May | 60 |
Jun | 70 |
Jul | 80 |
Aug | 90 |
Sept | 10 |
Oct | 20 |
Nov | 30 |
Dec | 40 |
If user selects Feb then it will show Jan+Feb/2
If user selects Mar,Apr,May then it will show Feb+May/2
Can you please suggest.
Thanks
Either convert your Month field to be a dual field in the script using this:
LOAD Month(Date#(Month, 'MMM')) as Month
or try this expression:
=Sum({<Month={"$(=Pick(MinString(Month(Date#(Month, 'MMM'))-1), 'Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'))","$(=MaxString(Date#(Month, 'MMM')))"}>} Data) /2
Hi
I'm not clear what your rules for the expression are.
For example, if the user selects Jul, Aug, Sep, what would the result be ?
Second part is not clear "If user selects Mar,Apr,May then it will show Feb+May/2" could you explain with an example i.e the output your excepting
Hi,
try
Sum({<Month={'$(=Min(Month)-1)','$(=Max(Month))'}>} Data) /2
Regards
Hi,
For multiple month selection We need max( month) + Min (month) -1 .
Otherwise show max (month)+ max( month)-1 if selection is only one month
Thanks,
I think @antoniotimanhas already given the solution , did you tried ??
Hi,
Thanks but this is not working
Thanks
Is month a text field or is it a dual field created using a date field?
Is This is a Text field which you want to show the O/P
yeah it is text field