Forum Discussion
Group by specific condition
Hello,
I have a table that I'd like to group by with a specific condition, the condition is : each time there is a 1 in a colum I'd like to group until there is another 1 in the same column. (Not sure it is very clear so I made a picture of what I'd like).
I'm not even sure it is possible with Power BI, but still any advice would be nice.
Thanks in advance.
In the query editor just add an index column first. Then multiply that with Type. Replace 0 by null and fill down values.
That will allocate the same number to each row in the group but a different number per group.
2 Replies
- ImkeF
Community Champion
In the query editor just add an index column first. Then multiply that with Type. Replace 0 by null and fill down values.
That will allocate the same number to each row in the group but a different number per group.
- HugoCExtARegular Visitor
Thanks, it worked ! Did not know the fill function :)