Forum Discussion
SriGaG
5 years agoFrequent Visitor
Python visualizations in power bi -Issues with the visuals
Hello experts,
I am running in to an error of ordering the month in power b visuals in python scripting.
Here is the code i am referring.
Can anyone help me to find me the way of ordering this on the pbi visual?
import matplotlib.pyplot as plt
ax = plt.gca()
dataset.plot(kind='line', x='Month', y='cases', color='red',ax=ax)
dataset.plot(kind='line', x='Month', y='deaths', color='green', ax=ax)
plt.show() when look in to the green line, it also not categorized clearly. can you help me on this?
And when i selected date, why the chart behaves like this?
My expectation was a flowing line chart on the visual. I have selected the current monthe in the filter. This shows the data from Aug 1 to Aug 20, 2021.
1 Reply
- lbendlinSuper User
instead of
x='Month'you should have something like
x='YearMonth'Looks like your date filter does not impact the data frame. Check your data model.