Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

How to find hours range

Hi Team,

 

have one question ..... how we can configure the below range in one measure , please check and guide me

<=3 hrs3-8 hrs8-12 hrs12-24 hrs>24 hrs

"

Thanks,

Krishna 

 

1 REPLY 1
SamInogic
Super User
Super User

Hi @Anonymous ,

 

We are bit unclear with your table structure where you capture the Hours data, so we have considered below table which holds hours value,


Forum 1.png

 

Also, the Slicer to filter these hours, we have created a table with options you mentioned as shown in below screenshot.

Forum 2.png

 

In order to filter the data based on selection you need to create a Measure in Data table with DAX expression as:

 

Filter Hours = SWITCH(SELECTEDVALUE(Hours[Hours]), "<=3 hrs", IF(SELECTEDVALUE(Data[Data Hours])<=3,"In","Out") ,

    "3-8 hrs",IF(SELECTEDVALUE(Data[Data Hours])>3 && SELECTEDVALUE(Data[Data Hours])<8,"In","Out")

    ,"8-12 hrs",IF(SELECTEDVALUE(Data[Data Hours])>=8 && SELECTEDVALUE(Data[Data Hours])<12,"In","Out"),

    "12-24 hrs",IF(SELECTEDVALUE(Data[Data Hours])>12 && SELECTEDVALUE(Data[Data Hours])<=24,"In","Out"),

    ">24 hrs",IF(SELECTEDVALUE(Data[Data Hours])>24,"In","Out")


Forum 3.png

 

This will check the selected value in the slicer i.e. filter and based on current value of table row validate the hours falls within selected range or out of the range.

 

Please refer to the below screenshot for the same.

 

Forum 4.png

Now in order to filter the table for respective data to be displayed in table as per the range selection we need to add filter to the table as Filter Hours = In as shown in the below screenshot.

 

Forum 5.png


If this answer helps, please mark it as an Accepted Solution so it would help others to find the solution.


Thanks!

Inogic Professional Service Division

An expert technical extension for your techno-functional business needs

Power Platform/Dynamics 365 CRM

Drop an email at crm@inogic.com

Service:  http://www.inogic.com/services/ 

Power Platform/Dynamics 365 CRM Tips and Tricks:  http://www.inogic.com/blog/

Inogic Professional Services: Power Platform/Dynamics 365 CRM
An expert technical extension for your techno-functional business needs
Service: https://www.inogic.com/services/
Tips and Tricks: https://www.inogic.com/blog/

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Users online (5,611)