Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
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)
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
104 | |
101 | |
79 | |
72 | |
64 |
User | Count |
---|---|
143 | |
109 | |
103 | |
82 | |
74 |