Forum Discussion

BJRoth's avatar
BJRoth
Frequent Visitor
6 years ago
Solved

Scatter Chart Legend Not Filtering Measure in Tooltip

This is a simplified version of the issue which was encountered whilst using a much larger set of data.

I have three tables of data, "Departments", "Products" and "Values". The structure and relationships of these tables can be seen below.

Relationships

I also have a measure called "Top Product" to identify the top product, which works in a table with max value, department and date columns, and as a tooltip in other visuals such as the Line Chart, where the department is the legend, max of value is the value and the date is the axis.

Top Product Measure

However, the scatter chart doesn't seem to take into account the legend as in other visuals, meaning the measure doesn't know which department to look for and so just takes the first Product where Value = MAX(Value) from all departments. This results in the tooltip giving the same "Top Product" for all Departments, as seen below.

Scatter Chart - WomensScatter Chart - MensScatter Chart - Kids

Is there a way around this, so that the department is considered in the measure? Or is this just a quirk/bug of Power BI/the scatter chart visual I'll have to work around?

  • Hi BJRoth ,

     

    Based on my test, I can reproduce your issue here. Thanks for pointing it out. I have reported it to PG. Once fixed, will let you know 🙂

     

     

4 Replies

  • v-frfei-msft's avatar
    v-frfei-msft
    Community Support

    Hi BJRoth ,

     

    Based on my test, I can reproduce your issue here. Thanks for pointing it out. I have reported it to PG. Once fixed, will let you know 🙂

     

     

    • Anonymous's avatar
      Anonymous
      Not applicable

      Hi, any guess as to when this will be fixed? Still experiencing the issue. Thanks!

  • v-frfei-msft's avatar
    v-frfei-msft
    Community Support

    Hi BJRoth ,

     

    I think you should use allexcept in your filter such as :

     

    measure = calculate(expression ,filter(allexcept(your table, [legend]),filter condition))

    If it doesn't meet your requirement, kindly share your sample data and excepted result to me if you don't have any Confidential Information. Please upload your files to One Drive and share the link here.

     

    • BJRoth's avatar
      BJRoth
      Frequent Visitor

      Hi v-frfei-msft 

       

      I think allexcept is what I was hoping for in terms of forcing the legend as a filter, however it just breaks my measure, which can't seem to return anything with allexcept included.

       

      I can't provide the live data, nor access any cloud sharing tools like One Drive, due to company policies. However, below is some sample data I created for the mock scenario, which does replicate the issue.

       

      In terms of desired output, if you create a table with the columns "Department", from the department table, "Top Product", the measure, "Max of Value" and "DateValidFor", then select any dot on a scatter chart using the same data, the table will show the information that should appear in the tooltip. 

      Product

      idProduct
      0Shirt
      1Trousers
      2Dress
      3Skirt
      4Blouse
      5Shoes
      6T-Shirt

      Department

      idDepartment
      1Mens
      2Womens
      3Kids

      Values

      idProductIDDepartmentIDDateValidForValue
      10101/01/201850
      20201/01/201824
      30301/01/201838
      41101/01/201833
      51201/01/201835
      61301/01/201849
      72101/01/201833
      82201/01/201835
      92301/01/201816
      103101/01/201823
      113201/01/201830
      123301/01/201842
      134101/01/201834
      144201/01/201816
      154301/01/201822
      165101/01/201810
      175201/01/201851
      185301/01/201830
      196101/01/201843
      206201/01/201836
      216301/01/201859
      220101/02/201829
      230201/02/201832
      240301/02/201857
      251101/02/201838
      261201/02/201855
      271301/02/201828
      282101/02/201844
      292201/02/201843
      302301/02/201841
      313101/02/201849
      323201/02/201855
      333301/02/201825
      344101/02/201831
      354201/02/201849
      364301/02/201834
      375101/02/201834
      385201/02/201844
      395301/02/201828
      406101/02/201834
      416201/02/201830
      426301/02/201844
      430101/03/201850
      440201/03/201849
      450301/03/201853
      461101/03/201817
      471201/03/201818
      481301/03/201812
      492101/03/201856
      502201/03/201859
      512301/03/201858
      523101/03/201826
      533201/03/201835
      543301/03/201839
      554101/03/201841
      564201/03/201830
      574301/03/201842
      585101/03/201845
      595201/03/201843
      605301/03/201831
      616101/03/201859
      626201/03/201829
      636301/03/201828
      640101/04/201820
      650201/04/201849
      660301/04/201858
      671101/04/201854
      681201/04/201836
      691301/04/201854
      702101/04/201852
      712201/04/201853
      722301/04/201857
      733101/04/201812
      743201/04/201813
      753301/04/201841
      764101/04/201856
      774201/04/201814
      784301/04/201825
      795101/04/201818
      805201/04/201838
      815301/04/201817
      826101/04/201831
      836201/04/201844
      846301/04/201847
      850101/05/201852
      860201/05/201827
      870301/05/201860
      881101/05/201835
      891201/05/201854
      901301/05/201842
      912101/05/201844
      922201/05/201847
      932301/05/201849
      943101/05/201840
      953201/05/201841
      963301/05/201822
      974101/05/201856
      984201/05/201828
      994301/05/201836
      1005101/05/201859
      1015201/05/201824
      1025301/05/201833
      1036101/05/201813
      1046201/05/201825
      1056301/05/201840
      1060101/05/201855
      1070201/05/201850
      1080301/05/201843
      1091101/05/201851
      1101201/05/201816
      1111301/05/201810
      1122101/05/201816
      1132201/05/201843
      1142301/05/201857
      1153101/05/201828
      1163201/05/201835
      1173301/05/201821
      1184101/05/201822
      1194201/05/201836
      1204301/05/201823
      1215101/05/201848
      1225201/05/201838
      1235301/05/201828
      1246101/05/201848
      1256201/05/201845
      1266301/05/201815
      1270101/06/201846
      1280201/06/201833
      1290301/06/201851
      1301101/06/201856
      1311201/06/201834
      1321301/06/201821
      1332101/06/201854
      1342201/06/201825
      1352301/06/201823
      1363101/06/201811
      1373201/06/201845
      1383301/06/201831
      1394101/06/201811
      1404201/06/201817
      1414301/06/201821
      1425101/06/201818
      1435201/06/201844
      1445301/06/201855
      1456101/06/201843
      1466201/06/201830
      1476301/06/201854