Forum Discussion
How to create a calculated column that shows how many new items have been added per month / week
- 5 years ago
Yes, you can do as calculated column too.
Earliest New Item Within Tower = var _RID = Table1[Risk ID] var _Twr = Table1[Tower] var _FirstDate = CALCULATE( Min(Table1[Export Date]), filter(Table1, Table1[Risk ID] = _RID && Table1[Tower] = _Twr)) RETURN IF ( Table1[Export Date] = _FirstDate, 1, 0)additional reading: I am not sure the end goal of the final model. I recommend to look:
To add ranking calculated column and then use for your needs.
https://community.powerbi.com/t5/Desktop/Summarize-and-Rank-by-multiple-columns-and-rows/m-p/330108
https://community.powerbi.com/t5/Desktop/Rank-from-Min-to-MAX-Calculated-Column/m-p/1793486
If it is me, I will not do as calculated column for min max by category. I will recommend as aggregate table using M Query. Purely depends on your needs and design way of things.
https://www.ehansalytics.com/blog/2020/7/16/return-row-based-on-max-value-from-one-column-when-grouping
sevenhills Instead of having a measure, is there a way to create a calculated column that assignes a 1 next to the new entries? If so that would be brilliant!
Thanks again 🙂
Yes, you can do as calculated column too.
Earliest New Item Within Tower =
var _RID = Table1[Risk ID]
var _Twr = Table1[Tower]
var _FirstDate = CALCULATE( Min(Table1[Export Date]), filter(Table1, Table1[Risk ID] = _RID && Table1[Tower] = _Twr))
RETURN IF ( Table1[Export Date] = _FirstDate, 1, 0)
additional reading: I am not sure the end goal of the final model. I recommend to look:
To add ranking calculated column and then use for your needs.
https://community.powerbi.com/t5/Desktop/Summarize-and-Rank-by-multiple-columns-and-rows/m-p/330108
https://community.powerbi.com/t5/Desktop/Rank-from-Min-to-MAX-Calculated-Column/m-p/1793486
If it is me, I will not do as calculated column for min max by category. I will recommend as aggregate table using M Query. Purely depends on your needs and design way of things.
https://www.ehansalytics.com/blog/2020/7/16/return-row-based-on-max-value-from-one-column-when-grouping
- deanbland5 years ago
Helper III
This works perfectly, thank you!!