Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
ydelreal
Partner - Contributor
Partner - Contributor

Bar Chart HELP! Possible if function??

Hello,

I am trying to add bar chart ( x axis= individual records, y axis = duration), but I only want records to appear if they occurred within the last 30 days. Any idea how to do this?

I would also like to create another chart to display average duration by category based on the last 30 days.

Any suggestions on how to do this?

Thank you!!!

3 Replies
sfatoux72
Partner - Specialist
Partner - Specialist

‌Essaye avec un Set Analysis :

Sum({$<DateField={"$(= '>=' & date(daystart(now())-30) & '<=' & date(now()))"}>} duration)

Remplace DateField par le nom de ton champ date

thi_pham
Creator III
Creator III

What is connection between the Duration measure and your Date dimension?

ydelreal
Partner - Contributor
Partner - Contributor
Author

Hi, Thank you for the response. How would I go about putting this into a bar chart? I created the measure, and added to the height section. I then added 'record number' in the bar section, but it did not work.

Values I need;

Record # to display in the x axis

Duration in the y axis

and the bar height will be the duration for each record, but only for the last 30 days.

And a second bar chart that will display the average duration for the past 30 days grouped by category.