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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
hans3400
Helper I
Helper I

Calculate % of a column

Hi

 

A brief explanation. Of all invoices made in a month, 95% usually is sent as a letter. I'm going to decrease that percantage to, let's say 70% and want to show the cost reduction each month. So I want a measure or column that calculates 95% of all invoices made in a month and then a column or measure theat shows the variance from the actual % of letters sent (70%.)

 

Table looks like this:

DateTotal invoices madeInvoices sent as letter
Jan/22100009500
Feb/22100008000
Mar/22100007000

 

Hope it makes sense.

1 ACCEPTED SOLUTION
v-yinliw-msft
Community Support
Community Support

Hi @hans3400 ,

 

You can try this method:

New a measure:

DEC =
CALCULATE (
    SUM ( 'Table'[Total invoices made] ) * 0.95
        - SUM ( 'Table'[Invoices sent as letter] ),
    FILTER ( 'Table', 'Table'[Date] )
)

The result is:

vyinliwmsft_0-1669193708890.png

 

 

Hope these help you.

Here is my PBIX file.

 

Best Regards,

Community Support Team _Yinliw

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
v-yinliw-msft
Community Support
Community Support

Hi @hans3400 ,

 

You can try this method:

New a measure:

DEC =
CALCULATE (
    SUM ( 'Table'[Total invoices made] ) * 0.95
        - SUM ( 'Table'[Invoices sent as letter] ),
    FILTER ( 'Table', 'Table'[Date] )
)

The result is:

vyinliwmsft_0-1669193708890.png

 

 

Hope these help you.

Here is my PBIX file.

 

Best Regards,

Community Support Team _Yinliw

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

 

Thank u so much for your help. It works as intended. Do u mind explaining what the last line does? "

 FILTER ( 'Table', 'Table'[Date] )

I'm pretty new to PBI, so try to learn as much as possible.

 

Hi @hans3400 ,

 

This filter is used to filter dates by group.

 

Best Regards,

Community Support Team _Yinliw

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

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

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.