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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
Winston_Lai
New Member

Violin Plot (1.2.0) Plots Graph with Wrong Data

Hi everyone!

 

Recently I installed the extension "Violin Plot (1.2.0)" from the market place. I plotted the violin plot to visualize the quantity distribution by month. However, after I right clicked on the produced graph and clicked on the "Show Data" button, I saw that there is a wrong data in the data table, which casued to the wrong plots as well.

 

The screenshot of that particular row of data with the violin plot could be accessed via the OneDrive Link.

1 ACCEPTED SOLUTION

Hi @Winston_Lai ,

It's hard to determine everything from your screenshot, but I'd suggest the following:

  • Put the Index column in the Sampling field - this is to ensure that all rows are unique going into the visual
  • Put your Month column in the Category field
  • Put your Quantity column in the Measure field

If this is still causing you trouble, please feel free to share your workbook with me privately - my contact details are on the repo wiki - and I will try to set up an appropriate configuration for you to illustrate.

In terms of further resources, the wiki or the sample report on AppSource fully document the visual and its capabilities.

Best of luck,

Daniel





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!


My course: Introduction to Developing Power BI Visuals


On how to ask a technical question, if you really want an answer (courtesy of SQLBI)




View solution in original post

11 REPLIES 11
v-xicai
Community Support
Community Support

Hi @Winston_Lai ,

 

Could you please describe the criteria to judge the exported data is wrong? What is your desired result? You can share your sample data or desired output in screenshots for further analysis.

 

Best Regards,

Amy

Hi Amy,

 

Referring to the screenshot: https://1drv.ms/u/s!AmY23HMj-m0In-49hOOUYGqKXmu9gw 

 

The correct data as per loaded into Power BI is "1164, March" whereas Violin Plot takes it as "2328" for plotting, which is incorrect. I have plot exactly the same set of data for normal bar chart, it shows correctly as "1164". And there is only one record "1164" in March.

 

Thank You & Best Regards

Winston Lai

Hi @Winston_Lai ,

 

Maybe there are two records for the same "1164, March" , and them are summarized automatically? You can check the truth in Data view.

 

Best Regards,

Amy

Hi Amy,

 

Yeah, there are two records on different dates of March with "1164". In this case, I want to produce the violin plot to show the distribution of quantity in March but I don't want the two records on different dates to be taken as one. How could I achieve it?

 

Thank You & Best Regards

Winston Lai

Hi @Winston_Lai ,

The visual needs a unique value for each sampling row, so that they don't get pre-aggregated - the easiest way to do this is to create an index column in your query, or use a primary key if you have it.

I hope this helps you out, and I hope that you enjoy the visual,

Daniel





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!


My course: Introduction to Developing Power BI Visuals


On how to ask a technical question, if you really want an answer (courtesy of SQLBI)




Hi Daniel,

 

For my data set, each "Date" is unique as a primary key and it is already read as date hierarchy format in Power BI. I want to produce violin plot by grouping the "Quantity" data by month. So I dragged the "Month" from the date hierarchy field to plot the graph. That is where the aggregation occurs. I tried to create the additional index column but it didn't help. I can't drag that index field to help me in this case. How should I make use of Index column?

 

Thank You & Best Regards

Winston Lai

Hi @Winston_Lai ,

It's hard to determine everything from your screenshot, but I'd suggest the following:

  • Put the Index column in the Sampling field - this is to ensure that all rows are unique going into the visual
  • Put your Month column in the Category field
  • Put your Quantity column in the Measure field

If this is still causing you trouble, please feel free to share your workbook with me privately - my contact details are on the repo wiki - and I will try to set up an appropriate configuration for you to illustrate.

In terms of further resources, the wiki or the sample report on AppSource fully document the visual and its capabilities.

Best of luck,

Daniel





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!


My course: Introduction to Developing Power BI Visuals


On how to ask a technical question, if you really want an answer (courtesy of SQLBI)




Hi Daniel,

 

It works! Thank you so much for the help!

No probs - glad it's all sorted for you! 🙂





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!


My course: Introduction to Developing Power BI Visuals


On how to ask a technical question, if you really want an answer (courtesy of SQLBI)




Hi,

 

You can remove duplicates value if this operation won't affect other important column value.

 

5.png

 

 

 

 

 

 

 

Best Regards,

Amy

Hi Amy,

 

Thank you so much for the annotated screenshot! I understand that I can remove the duplicate data to avoid confusion. But what if I need to keep all the data and still visualize them on the violin plot? When I group the "quantity" data by month, they happen to be the same value. However, they are actually different. Since I can plot them correctly on Excel with normal box plot, is there any turnaround on violin plot for me to fix this issue?

 

Thank You & Best Regards

Winston Lai

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

Find out what's new and trending in the Fabric Community.