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

Percentage per Category and Month

Hi.

I'm trying to make a percentage over category and month but I don't know how to do.

I have categories in rows and months in column and I need to make the percentage over the total. 

 

danielkataoka_0-1661363948272.png


I have tried to use ALLSELECTED but it didn't work as expected.


1 ACCEPTED SOLUTION
PabloDeheza
Solution Sage
Solution Sage

Hi there!
Try the following:
% =

VAR _CurrentValue =
    [R$]
VAR _AllValue =
    CALCULATE(
        [R$],
        ALL( Category ),
        ALL( MonthName )
    )
VAR _Result =
    DIVIDE(
        _CurrentValue,
        _AllValue
    )
RETURN
    _Result
 
Let me know if that helps!

View solution in original post

1 REPLY 1
PabloDeheza
Solution Sage
Solution Sage

Hi there!
Try the following:
% =

VAR _CurrentValue =
    [R$]
VAR _AllValue =
    CALCULATE(
        [R$],
        ALL( Category ),
        ALL( MonthName )
    )
VAR _Result =
    DIVIDE(
        _CurrentValue,
        _AllValue
    )
RETURN
    _Result
 
Let me know if that helps!

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!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

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.