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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
WimB
Regular Visitor

Dynamic filtering on a scatter plot

Good day!

 

I  have a scatter plot (showing a 'sunbeam' type of roadmap) based on a table, with in the report a number of filters on the table.

Depending on the filters applied in the report, I want to re-calculate the position of dots on the scatter plot to spread them according to the new number of items.

Question is: how do I get the total of the filtered rows into a measure?

Count = CALCULATE(COUNTROWS( 'Roll up'), ALLSELECTED('Roll up')) does not do the tric.
 
Example - I have a table of 100 rows
- Initial scatter plot shows the 100 dots nicely spread out horizontally
- There is a filter on the side that allows to filter out 10 rows in the table
- Objective: the 10 remaining dots now need to be spread out horizontally (i.e. dynamically updating the X val
  Calculation required: (width / "number of filtered out rows") to calculate the actual spread over the scatter plot
2 REPLIES 2
WimB
Regular Visitor

Hey,

 

I have e.g. the data like this:

CountryDeptValue in $OrderXY
BEDept a41  
BEDept a62  
BEDept b103  
FRDept C34  
FRDept b55  

 

I want to have a scatter plot that shows the filtered data spread in a sunray type of way.

X and Y values are direct input to the x and y for the scatter plot.

X = COS(RADIANS(270 - 90 *(Order / Total)

Y = SIN(RADIANS(270 - 90 * (Order / Total)

With total = 5 (i.e. the total number of rows)

And with "Order" column calculated automatically

 

Problem is: I want to have a filter next to the scatter plot to filter e.g. on Country  = FR. At that point, I need to have Order and Total dynamically re-calculated:

Total = 2 (as I have 2 lines left after the filtering on Country = FR)

Order needs to update as well, showing nothing in the first 3 lines and 1 and 2 in the two bottom lines.

The scatter plot needs to be updated accordingly as well, taking into account the newly calculated X and Y value.

 

I starting to doubt that all of this is actually possible 🙂

 

Thanks,

 

Wim

 

v-luwang-msft
Community Support
Community Support

Hi @WimB ,

Could you pls share your sample data and  expect output result?

 

 

 

Best Regards

Lucien

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

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

MayPowerBICarousel

Power BI Monthly Update - May 2024

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