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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
Anonymous
Not applicable

creating customer column or measure from subtotals

I'm wanting to create a % comparison of two subtotaled catagories based on totals by month.

In Power BI I have created tabular layout.  

Any assistance in how this can be computed?

1 ACCEPTED SOLUTION

@Anonymous,

 

You may try the measure below.

Measure =
DIVIDE (
    CALCULATE ( SUM ( Table1[amount] ), Table1[type] = "Gas" ),
    CALCULATE ( SUM ( Table1[amount] ), Table1[type] = "Diesel" )
)
Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
GilbertQ
Super User
Super User

Hi there Have you created the comparative measure between the two values? Then you can enable subtotals on tables and matrix visuals?




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

Proud to be a Super User!







Power BI Blog

Anonymous
Not applicable

Thanks for the idea.

 

If I'm creating a new measure, could you assist me with the DAX?

 

I have tabular data as:

 

           Gas       Diesel

Jan     456.23   532.11

Feb    987.65   285.33

Mar   658.21    296.83

 

These are in three columns

date

type

amount

 

I want to divide the gas subtotal by diesel subtotal by month.

THX

@Anonymous,

 

You may try the measure below.

Measure =
DIVIDE (
    CALCULATE ( SUM ( Table1[amount] ), Table1[type] = "Gas" ),
    CALCULATE ( SUM ( Table1[amount] ), Table1[type] = "Diesel" )
)
Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 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.