cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Winston_Lai Frequent Visitor
Frequent Visitor

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

Accepted Solutions
dm-p Established Member
Established Member

Re: Violin Plot (1.2.0) Plots Graph with Wrong Data

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

11 REPLIES 11
Community Support Team
Community Support Team

Re: Violin Plot (1.2.0) Plots Graph with Wrong Data

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

Winston_Lai Frequent Visitor
Frequent Visitor

Re: Violin Plot (1.2.0) Plots Graph with Wrong Data

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

Community Support Team
Community Support Team

Re: Violin Plot (1.2.0) Plots Graph with Wrong Data

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

Winston_Lai Frequent Visitor
Frequent Visitor

Re: Violin Plot (1.2.0) Plots Graph with Wrong Data

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

Community Support Team
Community Support Team

Re: Violin Plot (1.2.0) Plots Graph with Wrong Data

Hi,

 

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

 

5.png

 

 

 

 

 

 

 

Best Regards,

Amy

dm-p Established Member
Established Member

Re: Violin Plot (1.2.0) Plots Graph with Wrong Data

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

Winston_Lai Frequent Visitor
Frequent Visitor

Re: Violin Plot (1.2.0) Plots Graph with Wrong Data

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

Winston_Lai Frequent Visitor
Frequent Visitor

Re: Violin Plot (1.2.0) Plots Graph with Wrong Data

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

dm-p Established Member
Established Member

Re: Violin Plot (1.2.0) Plots Graph with Wrong Data

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

Helpful resources

Announcements
GregDeckler

How to Get Your Question Answered Quickly

Power BI Super User, Greg Deckler, explains

Summit North America

Power Platform Summit North America

Register by September 5 to save $200

Back to School Contest

Back to School Contest

Engage and empower students with Power BI!

MBAS Gallery

Watch Sessions On Demand!

Continue your learning in our online communities.

Top Ideas
Users Online
Currently online: 39 members 892 guests
Please welcome our newest community members: