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.
Greetings,
I have already created a column that has Age. I want to create columns like '1 - 30', '30 - 60' and add the amount based on the Days past (Age). I'm not sure if I should use Custom columns, Conditional columns, or DAX functions. Any help would be greatly appreciated.
The third and fifth rows are good examples of what I want to do. Thank you!
Solved! Go to Solution.
Hi @hari_sreen123 !
You can create 4 new columns using following DAX code;
1 - 30 = IF(Table[Age] >= 1 && Table[Age] <= 30, Table[Amount], 0)
31 - 60 = IF(Table[Age] >= 31 && Table[Age] <= 60, Table[Amount], 0)
61 - 90 = IF(Table[Age] >= 61 && Table[Age] <= 90, Table[Amount], 0)
91 - 120 = IF(Table[Age] >= 91 && Table[Age] <= 120, Table[Amount], 0)
You can replace Table with your table name, [Age] is the column which you used for calculating Days past, and [Amount] is a column which you want to assign.
Regards,
Hasham
Hi @hari_sreen123 !
You can create 4 new columns using following DAX code;
1 - 30 = IF(Table[Age] >= 1 && Table[Age] <= 30, Table[Amount], 0)
31 - 60 = IF(Table[Age] >= 31 && Table[Age] <= 60, Table[Amount], 0)
61 - 90 = IF(Table[Age] >= 61 && Table[Age] <= 90, Table[Amount], 0)
91 - 120 = IF(Table[Age] >= 91 && Table[Age] <= 120, Table[Amount], 0)
You can replace Table with your table name, [Age] is the column which you used for calculating Days past, and [Amount] is a column which you want to assign.
Regards,
Hasham
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 |
---|---|
97 | |
96 | |
81 | |
74 | |
66 |
User | Count |
---|---|
126 | |
106 | |
105 | |
86 | |
72 |