Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Creating a bar graph with an expression that changes as per the selection

Hi,

I have a requirement wherein I need to plot a bar graph which will show the sum(sales)*number of days as the expression and month-year as my expression. I am using the Fiscal Caledar ,  I need the logic to calculate the no of days between the first day of April of the year being selected and the no the number days elapsed for the month being selected. i.e., if the selected month is Apr I must see a single bar where the calculation would be like sum(sales)*number of days(30 days)

Similarly if I have selected the month as May I must see two bars where the calculation for the april bar is sum(sales)*30

and May would be sum(sales)*61(i.e., number of days between 1st of april to 31 st of May).

I need a single expression for this as the Months on the must vary as per the selection made.

Here my start day will be fixed as 1st of April and my end day will vary for each bar represented as per the selection made on the app

Please help me achieve this

1 Reply
Not applicable
Author

Hi,

If your data set is small, I would suggest you to make changes at the script level, I don't think we can achieve this at expression level.

Regards,

Navdeep