Forum Discussion
Anonymous
4 years agoNot applicable
Create column charts month wise
Hi team,
I've data in the following format in a table titled "sms":
| datetime | reason | status |
| 30-01-2022 | AA | failed |
| 12-02-2022 | AA | failed |
| 15-02-2022 | AB | failed |
Then i've created a new Calendar table with calendarauto() function and linked with datetime.
I want to create a bar graph as following for each month and year separately.
The problem is that it is giving me % of total not the month wise %
i've created a measure as following
Count Reason = COUNTAX('SMS',SMS[reason])
Selected Axis= reason
Values = %GT Count Reason
Small multiples= Date //from Calendar table
Hi Anonymous ,
Add the following measure to your model and use it on your chart:
Percentage by month = DIVIDE ( COUNTROWS ( sms ), COUNTROWS ( FILTER ( ALL ( SMS ), sms[datetime] IN VALUES ( 'Calendar'[Date] ) ) ) )
1 Reply
- MFelixSuper User
Hi Anonymous ,
Add the following measure to your model and use it on your chart:
Percentage by month = DIVIDE ( COUNTROWS ( sms ), COUNTROWS ( FILTER ( ALL ( SMS ), sms[datetime] IN VALUES ( 'Calendar'[Date] ) ) ) )