Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

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

 

 

  • 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

  • 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] ) )
        )
    )