Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
I am trying to quite simply plot a histogram containing the frequency at which a number occurs in my dataset. In a Juypter notebook I run
sns.countplot(dataset['responseCode'])
And get the histogram I expect. However when I run the code in PowerBI, it sets everything to 1.0. Does anyone know why?
Solved! Go to Solution.
hi @Anonymous
For your case, just try this simple way:
Create a measure as below:
@Anonymous I'm not python/R developer, if you share sample data with expected output, I can help. Just to let you know, you can use R and Python visual in Power BI as well. 🙂
Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!
Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo
If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤
Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.
Hi @parry2k
The data will look something like
Response code
500
500
200
200
200
200
200
500
I want to count the number of times 500 or 200 appears. When I run in Juypter I get
However when I run in powerBI, the same piece of code I get.
I dont know why its normalising to 1
hi @Anonymous
For your case, just try this simple way:
Create a measure as below:
Thanks for both of your help. So i have the plot as shown by @v-lili6-msft But i dont want the spaces in between i really want it to be discrete catagories as shown in the seaborn plot above
Actually I have solved it. Just needed to switch to catagorial 🙂
Thanks everyone will mark as solved
@Anonymous what is the aggregation on Value section of chart you used?
Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!
Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo
If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤
Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.
At the moment it is set to don't summerise. I tried changing to count and count distinct. It still gives me rubbish
@Anonymous it is not possible that you have dont summarize, in value section, it has to be some aggregation until your column is not number.
Add following measure and use that in value
Total Rows = COUNTROWS ( YourTable )
Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!
Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo
If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤
Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.
I dont really understand what you mean. I am new to powerbi, how do I add a measure?
@Anonymous no worries, here it is
Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!
Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo
If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤
Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.