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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
Anonymous
Not applicable

Workaround for multiple filters on line chart

I am trying to filter data based on several filters which doesn't work since only one of my relationships can be active. Is there a workaround for this? Or does anyone have any tips on how I can tabulate my data better to achieve my end goal?

 

Essentially I've got tables containing data about the temperature and CO2 level in a specific room with all the data points time stamped. I have also created a master date+time table. What I want is for the user to be able to choose a building/room and also a date/time interval. The line chart should then reflect this filtering and only contain lines from the given rooms in the given time frame. 

 

This is the master time+date table and an example of a table with temperature and CO2 data from one room: 

DateTime.PNG     Dataframe1.PNG 

 

I also have a table containing all the room numbers for the given building that looks something like this:

BuildingRoom
51151101023
51151101024
51151101025
51151101026

 

 

 

 

 

 

 

1 ACCEPTED SOLUTION

Hi @Anonymous ,

 

The relationship I modeled is the [room] field of the building and room table and the room field of the CO2 and temperature table. Where the building and room table is on one end. They are in an active relationship as shown below.

vtangjiemsft_0-1692172825390.png

Best Regards,

Neeko Tang

If this post  helps, then please consider Accept it as the solution  to help the other members find it more quickly. 

 

View solution in original post

3 REPLIES 3
v-tangjie-msft
Community Support
Community Support

Hi @Anonymous ,

 

According to your description, here are my steps you can follow as a solution.

(1) My test data is the same as yours.

(2) Click "transform data" to enter the power query, copy the datetime column of the [temperature and CO2] table, then split it, delete the redundant columns and leave the time column.

vtangjiemsft_1-1691994863284.png

(3)We can create two tables and build the relationship as follows.

Building Table = VALUES('building and room Table'[Building])
Time Table = VALUES('time+date table'[Time])

(4) Then the result is as follows.

vtangjiemsft_2-1691995021728.png

 

vtangjiemsft_3-1691995072201.png

 

 

Best Regards,

Neeko Tang

If this post  helps, then please consider Accept it as the solution  to help the other members find it more quickly. 

Anonymous
Not applicable

Hi @v-tangjie-msft , thank you!

 

How should the relationships be set up when including CO2 and temperature tables for the other rooms if I want them all to be active simultaneously?

Hi @Anonymous ,

 

The relationship I modeled is the [room] field of the building and room table and the room field of the CO2 and temperature table. Where the building and room table is on one end. They are in an active relationship as shown below.

vtangjiemsft_0-1692172825390.png

Best Regards,

Neeko Tang

If this post  helps, then please consider Accept it as the solution  to help the other members find it more quickly. 

 

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.