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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
NorbertG
Helper I
Helper I

Auto filtering based on values provided

Hi.
I have a problem with a line chart.
I want to automatically filter time based on values provided by sensors. For example:
Sensors provided values since 14:30 to 21:30 at 21st October 2023 and for them i have a slicer, which slices x-axis to time 14-22 etc
And i want to automatically slice chart by values in a day

My table

IdDateSensor 1Sensor 2Sensor 3Sensor 4Shift
121-09-2023 14:304565465412214
221-09-2023 14:318566611223114
321-09-2023 14:324454524454814
7 REPLIES 7
NorbertG
Helper I
Helper I

I want the graph to start and end on the blue lines

NorbertG_0-1696313663663.png

 

And the graph is made of 
x-axis: date
y-axis: sensor1,sensor2,sensor3

This should all be automatic if your Dates table controls your fact (sensor data) table.  Do you have a Dates table in your data model?

NorbertG
Helper I
Helper I

The thing is that data is automatically collected 24/7, even when sensor values are 0, that means when i slice my graph by day values start from 00:00 to 23:59

lbendlin
Super User
Super User

This should work automatically. Please provide a more detailed explanation of what you are aiming to achieve. What have you tried and where are you stuck?

I tried something like this, but it filters the sensor values and i only want to apply the shift value as a filter

CALCULATE(VALUES('table'[Licznik cefla_1]),FILTER(FILTER('table','table'[sensor1] > 0),'table'[shift]))

That code makes little sense.  Can you describe, in business terms, what you are trying to achieve?  Maybe even show the expected outcome?

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

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.