Forum Discussion

manjugoyal123's avatar
manjugoyal123
New Member
3 years ago

Bubble Chart with measures on both axis wont split vertically into 3 bubbles based on values

Hi All

 

I am trying to create a scatter plot in PBI Desktop for Report Server, not sure if it changes anything.

 

Data: My data has products categorized by brand they belong to and their unit price. 

 

Objective: Show top 5 brands by the different unit prices for each of the brand based on any slicer selections. Unit prices will be rounded to a close multiple, provided by user which is a parameter. 

 

Issue: I am able to create rank for brands. However, when I plot the unit price measure on y axis( unit price measure is basically rounding the unit price based on multiple value), the diff price buckets that should be created are not getting created. Right now, all products in a brand are coming as one big bubble whereas based on parameter value, maybe there are 4 diff price values, so i should see 4 bubbles for that brand. I tried seeing the same data in a table and it is showing the correct granularity. Attaching the PBI file with sample data here.

 

 

My original data :

BrandProductPrice
BrandAAA1.5
BrandAAB2
BrandAAC2.5
BrandAAD5.5
BrandAAE6.5
BrandAAF7
BrandAAG7.5
BrandAAH8
BrandAAI8.5
BrandBBA5.5
BrandBBB6.5
BrandBBC7.5
BrandBBD8
BrandBBE9
BrandBBF8.5
BrandBBG8
BrandBBH8.1
BrandCCA2.5
BrandCCB2
BrandCCC3.5

 

PriceRounded = mround(average(Sheet1[Price]),[PriceIncrement])
Rank = IF(
    RANKX(ALLSELECTED('Sheet1'[Brand]),
CALCULATE(COUNT(Sheet1[Product]), ALLEXCEPT(Sheet1,Sheet1[Product])),,DESC,Dense)<=5,
RANKX(ALLSELECTED(Sheet1[Brand]),
CALCULATE(COUNT(Sheet1[Product]), ALLEXCEPT(Sheet1,Sheet1[Brand])),,DESC,Dense))

​

 

 

 

Scatter Chart set up

Table Chart that shows correct values and its settings are as below:

Can someone please help.

2 Replies

  • manjugoyal123 , You can the use Min and Max values of the axis to set this

     

    You can use meausre using fx option

    for x-axis

    Max value = Maxx(summarize(Table, Table[Product], Table[Brand], "_1", [Rank]), [_1]) *1.1

     

    Min Value = Minx(summarize(Table, Table[Product], Table[Brand], "_1", [Rank]), [_1])*.9

     

     

    for x-axis

    y max= Maxx(summarize(Table, Table[Product], Table[Brand], "_1", [pricerounded]), [_1])*1.1

     

    y Min= Minx(summarize(Table, Table[Product], Table[Brand], "_1", [pricerounded]), [_1])*.9

  • Hi Amit

     

    This only changes the axis but I want the bubbles to be split. 

     

    So what I want is essentially that for the Brand A, since after rounding there are 3 prices - 2, 6 and 8 - there should be 3 bubbles at rounded price 2, 6 and 8 - one for each of the prices, the size of which should depend on number of products within the brand at that price point. This should be done for all the brands in my axis.