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,
Can anyone help me here?
I have "Pending Days" field in D:hh:mm: ss format - ex- 1 day 00:30:00. I want to group them on 0-20 , 21 to 40, 41 to 60 days.......likewise
Logic: if "Pending Days" come in 0-20 days then "0-20 group" likewise
Ticket No | pending in days | Groups |
12345 | 0 Day 00:19:00 | 0-20 |
45678 | 23 Day 00:09:00 | 21 -40 |
54678 | 53 Day 00:19:00 | 41 -60 |
6789 | 41 Day 00:19:00 | 41-60 |
Solved! Go to Solution.
Hi @Shree_185 ,
You can create a calculated column wiht the following syntax:
Days Group =
SWITCH (
TRUE (),
LEFT ( 'Table'[pending in days], FIND ( "Day", 'Table'[pending in days] ) - 2 ) <= "20", "0-20",
LEFT ( 'Table'[pending in days], FIND ( "Day", 'Table'[pending in days] ) - 2 ) > "20"
&& LEFT ( 'Table'[pending in days], FIND ( "Day", 'Table'[pending in days] ) - 2 ) <= "40", "21-40",
LEFT ( 'Table'[pending in days], FIND ( "Day", 'Table'[pending in days] ) - 2 ) > "40"
&& LEFT ( 'Table'[pending in days], FIND ( "Day", 'Table'[pending in days] ) - 2 ) <= "60", "41-60",
">60"
)
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsHi @Shree_185
If you want to create a measure, you can try this,
Measure =
var _getDay= INT(LEFT(MIN('Table'[pending in days]),SEARCH("D",MIN('Table'[pending in days]),,BLANK())-2))
return SWITCH(TRUE(),
_getDay>=0 && _getDay<21,"0-20",
_getDay>=21 && _getDay<41,"21-40",
_getDay>=41 && _getDay<61,"41-60"
)
Best Regards,
Community Support Team _Tang
If this post helps, please consider Accept it as the solution to help the other members find it more quickly.
Hi @Shree_185
If you want to create a measure, you can try this,
Measure =
var _getDay= INT(LEFT(MIN('Table'[pending in days]),SEARCH("D",MIN('Table'[pending in days]),,BLANK())-2))
return SWITCH(TRUE(),
_getDay>=0 && _getDay<21,"0-20",
_getDay>=21 && _getDay<41,"21-40",
_getDay>=41 && _getDay<61,"41-60"
)
Best Regards,
Community Support Team _Tang
If this post helps, please consider Accept it as the solution to help the other members find it more quickly.
Thank you, you made my day!!!
Hi @Shree_185 ,
You can create a calculated column wiht the following syntax:
Days Group =
SWITCH (
TRUE (),
LEFT ( 'Table'[pending in days], FIND ( "Day", 'Table'[pending in days] ) - 2 ) <= "20", "0-20",
LEFT ( 'Table'[pending in days], FIND ( "Day", 'Table'[pending in days] ) - 2 ) > "20"
&& LEFT ( 'Table'[pending in days], FIND ( "Day", 'Table'[pending in days] ) - 2 ) <= "40", "21-40",
LEFT ( 'Table'[pending in days], FIND ( "Day", 'Table'[pending in days] ) - 2 ) > "40"
&& LEFT ( 'Table'[pending in days], FIND ( "Day", 'Table'[pending in days] ) - 2 ) <= "60", "41-60",
">60"
)
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsMarch 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
125 | |
84 | |
67 | |
54 | |
43 |
User | Count |
---|---|
203 | |
106 | |
98 | |
65 | |
56 |