Alteryx Designer Discussions

Find answers, ask questions, and share expertise about Alteryx Designer.
ALTER.NEXT:

Join us on Dec 2 for a half-day virtual analytics + data science event!
US & CA customers only

SAVE YOUR SPOT
It's the most wonderful time of the year - Santalytics 2020 is here! This year, Santa's workshop needs the help of the Alteryx Community to help get back on track, so head over to the Group Hub for all the info to get started!
SOLVED

Dynamic weekly/monthly reporting

Highlighted
5 - Atom

Hi All,

 

I have an issue with my reporting.

 

We are reporting on a weekly base. So on every Monday or the first of the month we have to report the hours of the last week or last days of the month.

At this moment I have an working workflow. Which gives me the hours of the last week based on the Calendar Week.

 

I accomplished this with a formula in the filter tool as below:

ToNumber([Abrechnung KW])=
ToNumber((DateTimeFormat(DateTimeNow(),"%W")))

 

My Problem now is, for Example for the 30th of November. I have to report this day only. So if I run the workflow on the 1st of December I should only get the data for the 30th of November but with the current Workflow I only get the data for 23.11 - 29.11.

Same issue would be if I run the workflow on the 7th of December it would include the 30th of November, which it should not because it should be considered for November.

 

Is there anyway to accomplish this?

 

thank you very much in advance for your help

 

Highlighted
Alteryx Certified Partner
Alteryx Certified Partner

Hi @KRM ,

 

So to summarize, you wan the current week and only within the current month?

 

You could add another clause to your filter making it something like,

DateTimeFormat([Abrechnung KW], "%W") = DateTimeFormat(DateTimeToday(),'%W') AND
DateTimeMonth([Abrechnung KW]) = DateTimeMonth(DateTimeToday())

 

Highlighted
5 - Atom

Hi Philip,

 

thank you very much for your fast response.

 

I will try and let you now if it worked or not.

 

Thank you very much again

Highlighted
5 - Atom

Hi again,

 

thank you very much for the solution.

We just had to make some little adjustments to get it working. 

 

Because my column Abrechnung KW is a number the second part with the datetimemonth had to be done over an other column where I have also the dates.

Below you can see the final working solution.

 

(ToNumber([Abrechnung KW])=
ToNumber((DateTimeFormat(DateTimeNow(),"%W")))) and
DateTimeMonth([Abrechnungsdatum])=DateTimeMonth(DateTimeNow())

 

Thank you very much again for your help and have a great Weekend 🙂

 

Labels