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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric 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
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

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