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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

If a value exists more than once take one of the values.

For each type ABC, DEF, GHI,
If Body value exists more than once in 10 mins interval only take one of the values in that interval for each Type.

Below I have attached a sample data and the result I am expecting to get.

 

Sam9.PNG

 

The result I am expecting to get

LastSample.PNGLastSampleGraph.PNG

 

 

1 ACCEPTED SOLUTION
AlB
Super User
Super User

Hi @Anonymous

 

You can create a calculated table like this, where Table1 is the first table you show:

 

NewTable =
SUMMARIZECOLUMNS ( Table1[TimeInterval],
Table1[Type],
Table1[Airflow],
Table1[BodyValue] )

 

Note that this will work well if both Airflow and BodyValue are the same in the rows for the same ten minute interval and Type. Otherwise all different lines will be shown. For instance, take ABC at 10:40. Your data has three rows for it, all with Airflow=0 and BodyValue=1. Only one one row will be show in the new table. If you had instead two rows as shown and another one with for example Airflow=1 and BodyValue=1 the new table would show one row with Airflow=0 and BodyValue=1 and another with Airflow=1 and BodyValue=1  for ABC at 10:40       

 

On a different note, please always show your sample data in text-tabular format in addition to (or instead of) the screen captures. That allows people trying to help to readily copy the data and increases the likelihood of your question being answered. Just use 'Copy table' in Power BI and paste it here.

 

Cheers

View solution in original post

2 REPLIES 2
AlB
Super User
Super User

Hi @Anonymous

 

You can create a calculated table like this, where Table1 is the first table you show:

 

NewTable =
SUMMARIZECOLUMNS ( Table1[TimeInterval],
Table1[Type],
Table1[Airflow],
Table1[BodyValue] )

 

Note that this will work well if both Airflow and BodyValue are the same in the rows for the same ten minute interval and Type. Otherwise all different lines will be shown. For instance, take ABC at 10:40. Your data has three rows for it, all with Airflow=0 and BodyValue=1. Only one one row will be show in the new table. If you had instead two rows as shown and another one with for example Airflow=1 and BodyValue=1 the new table would show one row with Airflow=0 and BodyValue=1 and another with Airflow=1 and BodyValue=1  for ABC at 10:40       

 

On a different note, please always show your sample data in text-tabular format in addition to (or instead of) the screen captures. That allows people trying to help to readily copy the data and increases the likelihood of your question being answered. Just use 'Copy table' in Power BI and paste it here.

 

Cheers

Anonymous
Not applicable

@AlB Thank you! 🙂

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

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.