Forum Discussion
Automated List Management
- 7 years ago
HI, Anonymous
You could try this way:
First add an index column. Refer this post: https://community.powerbi.com/t5/Desktop/Creating-calculated-index-column-in-DAX/m-p/635397#M303922
Second, divide this index column by 50 (Integer)
INT((Table1[Index]-1)/50)
Then get result column
group = "Wave "&INT((Table1[Index]-1)/50)+1
For example:
In my simple sample, I use 3 instead of 50
Best Regards,
Lin
HI, Anonymous
You could try this way:
First add an index column. Refer this post: https://community.powerbi.com/t5/Desktop/Creating-calculated-index-column-in-DAX/m-p/635397#M303922
Second, divide this index column by 50 (Integer)
INT((Table1[Index]-1)/50)
Then get result column
group = "Wave "&INT((Table1[Index]-1)/50)+1
For example:
In my simple sample, I use 3 instead of 50
Best Regards,
Lin
v-lili6-msft So technically this does serve as the answer to my question. My only concern is the lack of customization.
Is there a way to make this conditional as well? For example - if I am doing wave 1 up to 50 people, however if the city changes (pre-sorted when making the index), the count should reset to 1. So if there are only 38 people in NYC for example, the count should stop at the 38th person and reset at 39. I know how to do this with Excel just not Power Query / BI
- v-lili6-msft7 years agoCommunity Support
hi, Anonymous
For your requirement, you need to use EARLIER Function to add the index column by group.
Best Regards,
Lin
- Anonymous7 years agoNot applicable
Hi Lin,
First thank you for your response and help.
The EARLIER Function only works on numeric values. I want the conditional column to be based off of user location such as NYC, Baltimore, China, etc..
This is an example of my failed attempt..
- v-lili6-msft7 years agoCommunity Support
hi, Anonymous
EARLIER Function should be used as below:
Earlier(NonMHFTreeUsers[Location])=NonMHFTreeUsers[Location]
And I couldn't find out the logic of your formula, you could share some simple sample data and expected output.
Best Regards,
Lin