Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Solved! Go to Solution.
Hi @RajivRavichand ,
I reproduced your problem with the formula you provided.
If you only return the selectedvalue, you'll find it's blank, SELECTEDVALUE isn't suitable here.
Just modify the formula to:
Column =
VAR Val = Consolidated_Data[System Time Min]
RETURN
SWITCH (
TRUE (),
Val >= 0 && Val < 1 , "0-1",
Val >= 1 && Val < 2 , "1-2",
Val >= 2 && Val < 3 , "2-3",
Val >= 3 && Val < 4 , "3-4",
Val >= 4 && Val < 5 , "4-5",
Val >= 5 && Val < 6 , "5-6",
Val >= 6 && Val < 7 , "6-7",
Val >= 7 && Val < 8 , "7-8",
Val >= 8 && Val < 9 , "8-9",
Val >= 9 && Val < 10 , "9-10")
Get the correct result.
I attach my sample below for your reference.
Best Regards,
Community Support Team _ kalyj
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
The structure of the SWITCH statement is this:
SysTimeRange1 = SWITCH(
TRUE(),
Consolidated_Data[System Time Min] > 0 &&
Consolidated_Data[System Time Min] < 1, "0-1",
Consolidated_Data[System Time Min] > 1
&& Consolidated_Data[System Time Min] < 2, "1-2",
etc....
I notice you do not have any equal signs in your example. If you have instances where [System Time Min] will equal a whole number, you will need to account for these in your Conditions.
Trust this helps.
Regards,
Thanks for your reply. Initially I tried with below switch but alwys returns "0-1" for all rows. That's why moved to nested if. In nested if it is working fine. but i have write up to 60 mins. Is there any builtin function? or any solution?
DAX:
Selected Value returns single value.. Switch is working fine. Please let me know is there any built in function for this.
Hi @RajivRavichand ,
I reproduced your problem with the formula you provided.
If you only return the selectedvalue, you'll find it's blank, SELECTEDVALUE isn't suitable here.
Just modify the formula to:
Column =
VAR Val = Consolidated_Data[System Time Min]
RETURN
SWITCH (
TRUE (),
Val >= 0 && Val < 1 , "0-1",
Val >= 1 && Val < 2 , "1-2",
Val >= 2 && Val < 3 , "2-3",
Val >= 3 && Val < 4 , "3-4",
Val >= 4 && Val < 5 , "4-5",
Val >= 5 && Val < 6 , "5-6",
Val >= 6 && Val < 7 , "6-7",
Val >= 7 && Val < 8 , "7-8",
Val >= 8 && Val < 9 , "8-9",
Val >= 9 && Val < 10 , "9-10")
Get the correct result.
I attach my sample below for your reference.
Best Regards,
Community Support Team _ kalyj
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Yes, It works fine. Thanks. Is ther any built in function to get the automatted values.
Hi @RajivRavichand ,
My pleasure!
As far as I know, SWITCH and IF are the general function in this type of problems.
Best Regards,
Community Support Team _ kalyj
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.