We are celebrating the 10-year anniversary of the Alteryx Community! Learn more and join in on the fun here.
Start Free Trial

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.

For each week, keep 1 number and have 0 as the rest.

wonka1234
10 - Fireball

 

Hi,

 

I have a number for each day of a week, but i want to not replicate the number and just have it show once for the week. Ie not aggregate per week.

 

current data:

 

DateDOWWeekRecordIDplaceholder
1/30/2023Monday1/30/202313553
1/31/2023Tuesday1/30/202313553
2/1/2023Wednesday1/30/202313553
2/2/2023Thursday1/30/202313553
2/3/2023Friday1/30/202313553

 

expected:

 

DateDOWWeekRecordIDplaceholder
1/30/2023Monday1/30/202313553
1/31/2023Tuesday1/30/202313550
2/1/2023Wednesday1/30/202313550
2/2/2023Thursday1/30/202313550
2/3/2023Friday1/30/202313550

 

Note that there are more "date" and "week"  with different "record id" this is just a sample.

 

hoping this makes sense.

5 REPLIES 5
Luke_C
17 - Castor
17 - Castor

Hi @wonka1234 

 

How is this fact pattern different than the other post you have? The same solution (or slight variation of it) should work

 

https://community.alteryx.com/t5/Alteryx-Designer-Desktop-Discussions/Make-column-B-0-for-all-but-1-...

 

danilang
19 - Altair
19 - Altair

Hi @wonka1234 

 

Do you want a single placeholder per week and ID or just week?

Does your week start on Monday or Sunday

 

Dan 

wonka1234
10 - Fireball

@danilang @Luke_C  week starts monday and goes to friday.

 

single placeholder per week and ID.

 

I came up with this from previous post - but unsure it does by week and ID..

 

multi row -  if isnull([Row-1:Week]) or [Week] != [Row-1:Week] then [placeholder] else 0 endif

danilang
19 - Altair
19 - Altair

@wonka1234 

 

This certainly looks like it will work.  Are the results correct when you try with your actual data?

 

Dan

hlee36
8 - Asteroid

Hi @wonka1234 

 

I would use "Tile" tool and make the "week" column as unique value in the tile configuration.

hlee36_1-1687196260043.png

 

Then, we can use a formula to convert the value of 1 in the tile number sequence into [placeholder] and other values into 0.

 

hlee36_2-1687196337086.png

 

 

hlee36_0-1687196184052.png

 

Labels
Top Solution Authors