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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
sdhn
Responsive Resident
Responsive Resident

Add another column for each month sapartely

Hello All,

 

I am using Power Bi desktop to develop Dashboards.

 

I created a Dashbaord based on the following information:

 

DEPARTMENTMONTHSCOUNTSMONTH NUMNER
WATER FEB802
ELECTRICITYMAR23
DMVAPR1004
GASFEB202
WATER MAR103
ELECTRICITYAPR54
DMVFEB602
GASMAR53
WATERJAN21
GASJAN51
DMVJAN301

  

On based of above infomation I created a percentage column as:

 

Percentage = DIVIDE('TABLE'[COUNT],sum('TABLE'[COUNT]))
 
It s calculate Total Percentage of each row. I used the total SUM of counts (which includes all months).
 
Now I want to add another column for each month sapartely.  Please advise.  
 
Your help wil be appreciated.
 
Thanks 
 
 
 
 
 
1 ACCEPTED SOLUTION
v-deddai1-msft
Community Support
Community Support

Hi @sdhn ,

 

Please use the following calculated column:

 

 

Percentage =
DIVIDE (
    'TABLE'[COUNT],
    CALCULATE (
        SUM ( 'TABLE'[COUNT] ),
        FILTER ( 'TABLE', 'TABLE'[MONTHS] = EARLIER ( 'TABLE'[MONTHS] ) )
    )
)

 

Capture38.PNG

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

Best Regards,

Dedmon Dai

View solution in original post

2 REPLIES 2
v-deddai1-msft
Community Support
Community Support

Hi @sdhn ,

 

Please use the following calculated column:

 

 

Percentage =
DIVIDE (
    'TABLE'[COUNT],
    CALCULATE (
        SUM ( 'TABLE'[COUNT] ),
        FILTER ( 'TABLE', 'TABLE'[MONTHS] = EARLIER ( 'TABLE'[MONTHS] ) )
    )
)

 

Capture38.PNG

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

Best Regards,

Dedmon Dai

amitchandak
Super User
Super User

@sdhn , Create a measure like this and use with month in visual

 

Percentage = DIVIDE(sum('TABLE'[COUNT]),calculate(sum('TABLE'[COUNT]), allselected('TABLE')))

 

or

 

Percentage = DIVIDE(sum('TABLE'[COUNT]),calculate(sum('TABLE'[COUNT]), all('TABLE')))

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.