Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

Create column charts month wise

Hi team,

I've data in the following format in a table titled "sms":

datetimereasonstatus
30-01-2022AAfailed
12-02-2022AAfailed
15-02-2022ABfailed

 

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

 

deedeedudu_0-1647749042074.png

 

1 ACCEPTED SOLUTION
MFelix
Super User
Super 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] ) )
    )
)

MFelix_0-1647941068037.png

 


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



View solution in original post

1 REPLY 1
MFelix
Super User
Super 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] ) )
    )
)

MFelix_0-1647941068037.png

 


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.