Forum Discussion
% graph by month
- 6 years ago
Anonymous
I assume you have the calendar table and build relationship with the tale you shared.
Measure = VAR _count=COUNTROWS('Table') VAR _count2= CALCULATE(COUNTROWS('Table'),ALLEXCEPT(datetime,datetime[month])) return _count/_count2
Anonymous , I did not get it completely , See if this can help
https://radacad.com/showing-the-total-value-in-stacked-column-chart-in-power-bi
Hello amitchandak :
Thanks for the reply. But that is not what I am looking for.
Let me explain it with a simple example:
Let there be a data table with a column "Result" saying yes or no.
Whn I plot a graph with the column value "Count of Result", with the X-axis as month, then I get a graph showing how many "yes" and how many "no" per month.
What I want is % instead of count, for example: January has 10 "yes" and 10 "no", the graph should say 50% "yes" , 50% "no".
As per my understanding, we need a measure to do this,
I am just getting started with power bi, so not so sure how to do this.
Thanks in advance,
Rushi Sathi
- amitchandak6 years agoSuper User
Anonymous , I doubt that is possible. Check on any idea for that and vote or create a new idea
- ryan_mayu6 years agoSuper User
Anonymous
Try this measure and put measure in the value field.
% = sum('Table'[value])/CALCULATE(SUM('Table'[value]),ALLEXCEPT('Table','Table'[month]))Hope this is helpful.
- Anonymous6 years agoNot applicable
Hello ryan_mayu :
You are so close.
The way I have the data is a little different
Can you please tell me how to do it with the data like this?
Thank you in advance,
Rushi Sathi
- ryan_mayu6 years agoSuper User
Anonymous
I assume you have the calendar table and build relationship with the tale you shared.
Measure = VAR _count=COUNTROWS('Table') VAR _count2= CALCULATE(COUNTROWS('Table'),ALLEXCEPT(datetime,datetime[month])) return _count/_count2