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
brspencer90
Frequent Visitor

KPI Visual - How to compare one point to rest of filtered data using measures

Hi all - 

 

Looking to get some advice on a problem I'm running into currently. I have an large table that I'm visualising a subset of that data on a line chart. Slicers are below using enumerated data instead of label names for privacy purposes.

 

brspencer90_0-1634236233222.png

 

The goal of this page is to be able to select a single point of the subset of data, and be able to compare that single point to the rest of the points (inclusive of single point). I've created an independent but duplicate copy of the original table (named 'test') and have creatively named it 'Table' while I'm working this out.

 

I currently have the example measure in place for all three of the slicer variables (component, pump, and status) : 

brspencer90_1-1634236468235.png

The measure will get the distinct values of the slicers from the original and store that in comp_list. Then filter the table if the component id is in the selected slicer list, assigning it value. I then can filter out the values that aren't in the slicer by using a visual filter as below : 

brspencer90_2-1634236650761.png

 

When I plug the datapoints into a table visualisation I'm geting the appropriate value for the median duration. However, when I do the exact same thing for the KPI visualisation, I'm not getting the correct data. The Overall Median is for ALL tests - including other values that are outside of the slicer selections.

 

brspencer90_3-1634236703998.png

 

Does anyone have any advice on how to solve this problem?

1 ACCEPTED SOLUTION
brspencer90
Frequent Visitor

Here's a good one, I ended up using timestamp_start on the chart on the left, and timestamp_end for the KPI gauges.

 

Swapped KPI gauges to timestamp_start, and the values are changing with the filters as expected.

 

There are some data inconsistencies which I'm trying to solve right now, but this is the major issue that has been solved.

View solution in original post

3 REPLIES 3
brspencer90
Frequent Visitor

Here's a good one, I ended up using timestamp_start on the chart on the left, and timestamp_end for the KPI gauges.

 

Swapped KPI gauges to timestamp_start, and the values are changing with the filters as expected.

 

There are some data inconsistencies which I'm trying to solve right now, but this is the major issue that has been solved.

v-eqin-msft
Community Support
Community Support

Hi @brspencer90 ,

 

Not very clear. 

Can you please share more detail information(data sample , expected output...) to help us clarify your scenario?

 

Best Regards,
Eyelyn Qin

Hi Evelyn - 

 

Example (filtered by slicer) data : 

DatetimeDurationVolumeComponentPumpStatus
22-Aug 12:00 PM3074311
23-Aug 12:00 PM2973311
24-Aug 12:00 PM3076311
25-Aug 12:00 PM3177311
26-Aug 12:00 PM4072311
27-Aug 12:00 PM12074311
28-Aug 12:00 PM3873311

 

When I plot it in the chart (without selecting a single data point), I get the following medians for duration and volume.

 

duration : 30

volume : 74

brspencer90_4-1634564940730.pngbrspencer90_5-1634564949209.png

 

brspencer90_1-1634564013518.png

 

The function I have made is supposed to use the same filters as the subset (plotted) data and return these values when a single point is selected on the line chart visual. I am able to get the correct value to show up on a data table visual, but not in the actual KPI Gauge that I need it to show up in (as shown above).

The KPI Gauge Data Fields are as follows : 

brspencer90_2-1634564612405.png

Where :

duration = original table - single point selection

duration_median = measure to take the median of the secondary independent table

 

duration_median (current measure code) : 

brspencer90_3-1634564802694.png

On the KPI Gauge, I get overall median for ALL of the data in the datasets regardless of the measure filters that I have in place. 

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.