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
A_R
Regular Visitor

Power BI: Plotting reference curve against filters with incomplete datasets

Hi,

 

I have run in to a problem when plotting two datasets on the same line graph where one set is complete and the other is not. The grey line is a baseline curve that plots the full dataset, and the blue curve plots data based on a set of filters applied by the user.

 

When I plot the complete dataset (where no filters are applied, and both datasets are matching), I have a point for each value along the x-axis as expected:

 

A_R_4-1635437148141.png

 

When I introduce a filter, I no longer necessarily have data at each x-value for the blue curve but I would like to still plot the same data as above on the grey curve. However I am finding that the report is only plotting points where the data exists in both measures, as per the following report:

 

A_R_2-1635437080475.png

 

What I am looking for is to be able to plot every value on the grey baseline curve as per the first screenshot, even when an incomplete set exists for the blue filtered curve - any suggestions?

 

 

 

Thanks

 

 

 

2 REPLIES 2
Greg_Deckler
Super User
Super User

@A_R Can you post sample data. Seems like an interesting issue. Perhaps you could use interpolation to return values on your blue line when they don't exist and thus you could solve the issue that way. https://community.powerbi.com/t5/Quick-Measures-Gallery/Linear-Interpolation/m-p/330712#M88


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

Hi @Greg_Deckler ,

 

Thanks for your response. I can't unfortunately post sample data for this but I think I have narrowed down the issue somewhat.

 

When I apply filters to the page, since I am plotting a count (cumulative percentage) of a single column, my filters are affecting both the x- and y- axis data which I believe is why the grey curve is being limited at the same time. 

 

The issue in my original post occurs when I select a very narrow filter where data only exists for a subset of points on the x-axis. In this scenario I would ideally like to plot all data points on the grey curve as per the first example, and then just the smaller subset of the blue curve. I only wish to show my actual data so am not keen to interpolate.

 

I have tried redefining a duplicate column which I can then remove filters on and plot, something similar to:

 

 

grey_curve = 
    blue_curve, 
    ALL(filter1),
    ALL(filter2)
    )

 

 

but I can't seem to get this to work.

 

Do you have any suggestions on how I can plot this?

 

Thanks

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.