March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
Hi all,
I have the a table called "Plan" which looks like this:
ResourceName | Date | Task | Total Capacity Per Month |
A | 1 January, 2022 | A | 147 |
A | 1 February, 2022 | B | 147 |
B | 1 March, 2022 | D | 161 |
B | 1 March, 2022 | A | 161 |
B | 1 March, 2022 | C | 161 |
C | 1 April, 2022 | A | 140 |
C | 1 April, 2022 | B | 140 |
C | 1 May, 2022 | C | 154 |
D | 1 May, 2022 | D | 154 |
E | 1 May, 2022 | B | 154 |
I am trying to add a column to it for unique capacity per month for each resource. So I am looking to have something like this:
ResourceName | Date | Task | Total Capacity Per Month | Unique Capacity Per Month |
A | 1 January, 2022 | A | 147 | 147 |
A | 1 February, 2022 | B | 147 | 147 |
B | 1 March, 2022 | D | 161 | 161 |
B | 1 March, 2022 | A | 161 | 0 |
B | 1 March, 2022 | C | 161 | 0 |
C | 1 April, 2022 | A | 140 | 140 |
C | 1 April, 2022 | B | 140 | 0 |
C | 1 May, 2022 | C | 154 | 154 |
D | 1 May, 2022 | D | 154 | 154 |
E | 1 May, 2022 | B | 154 | 154 |
Thank you in advance for your help,
Solved! Go to Solution.
@Meiko , You need an index column for that. Add that in power query
new column in dax
if( [Index] = minx(filter(Table, [resourcename] = earlier([resourcename]) && [Date] = earlier([date]) ), [Index] ) ,[Total capacity per monnth], 0)
Thanks for this, but I am having a problem getting the index. I tried:
@Meiko , You need an index column for that. Add that in power query
new column in dax
if( [Index] = minx(filter(Table, [resourcename] = earlier([resourcename]) && [Date] = earlier([date]) ), [Index] ) ,[Total capacity per monnth], 0)
Thanks for this, but I am having a problem getting the index. I tried:
Instead of using DAX I just added the index in query and it worked.
Thanks
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
129 | |
90 | |
75 | |
58 | |
53 |
User | Count |
---|---|
200 | |
104 | |
101 | |
67 | |
55 |