Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hello,
I have a table like this:
Person | Week Number | Value |
A | 1 | 100 |
A | 2 | 50 |
A | 3 | 20 |
B | 1 | 50 |
B | 3 | 10 |
C | 1 | 15 |
C | 2 | 55 |
What I want is to take the unique values for Person and the unique values for Date and make a row for each unique pair, to create a new table like this:
Person | Week Number |
A | 1 |
A | 2 |
A | 3 |
B | 1 |
B | 2 |
B | 3 |
C | 1 |
C | 2 |
C | 3 |
That way, where for example person B doesn't have an entry for week 2, I can add a lookup column on the new table and say the value is 0.
Is there a formula to create this new table? I am thinking union, product, summarize.... not sure!
Solved! Go to Solution.
@Erf19 - Try:
Table =
GENERATE(
DISTINCT('Table'[Person]),
DISTINCT('Table'[Week])
)
@Erf19 - Try:
Table =
GENERATE(
DISTINCT('Table'[Person]),
DISTINCT('Table'[Week])
)
@Erf19 , Try a new Table like
union(
addcolumns(except(crossjoin(distinct(Table[Person]),distinct(Table[Week])), selectcolumn(Table,"Person",[Person],"Week",[Week])),"Number Value",0),
Table)
Check out the July 2025 Power BI update to learn about new features.
User | Count |
---|---|
72 | |
72 | |
38 | |
31 | |
27 |
User | Count |
---|---|
92 | |
50 | |
44 | |
40 | |
35 |