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.
I'm trying to create a new column that turns the first table into the second table. I'm trying to sum the hours that were done on each project.
Here is my code so far: NewColumn = sumx('Test Table', 'Test Table'[Hours])
Thanks!!!!
Hi @JoeKat07,
Could you please mark the right post if it worked? More about this topic, please feel free to post here.
Best Regards!
Dale
@JoeKat07 You need to use a measure, not a calculated column.
Measure = SUM('Test Table'[Hours])
Great! that worked! now im trying to display the projects that have over 100 hours, between 100 and 95, between 95 and 90, and below 90. The first one works great! i've made a calculated column that is able to show that 5,6,8,9, and 10 all have over 100 hours. However when i try and make a new calculated column that shows the id's that are between 100 and 95 i get a circular reference error.
i'm not sure where i have gone astray.
@JoeKat07 You can do the following static segmentation for this. (change to fit your needs)
First, create a seperate bucket table: (Buckets) - do not add a relationship to the other table, leave it disconnected.
Bucket Min Max > 100 101 9999999999 100-95 96 100 95-90 91 95 < 90 0 90
then you can use the above table as a reference for the calculated column. Create the calculated column in your 'Test Table'
Group = CALCULATE ( VALUES ( 'Buckets'[Bucket] ), FILTER ( 'Buckets', 'Test Table'[Hours] >= 'Buckets'[Min] && 'Test Table'[Hours] <= 'Buckets'[Max] ) )
This gives you the bucket, and you can use the measure hours in your visual with the bucket and it works showing you something like this:
If you need to sort it, then add one more column to the bucket table to order them 1,2,3,4 and you can use the "Sort by Column" in the modeling header when you are in the data section.
this works awesome if only row of data per grouping, but how do you get it to look at the total of all the rows with that same category (month, state, etc.), it said to do as measure instead of column, but that is not working using that measure in Calculated column and only works if hard code like "MI" for Michigan, but want a set of data to do for each State, how do you reference back to only give sum or whatever of all the rows that are the same month/state, etc. as that row? have tried RELATED and VAR but nothing works
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 |
---|---|
113 | |
99 | |
80 | |
70 | |
59 |
User | Count |
---|---|
149 | |
114 | |
107 | |
89 | |
67 |