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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

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
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

Power BI Carousel June 2024

Power BI Monthly Update - June 2024

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

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

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