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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
crisaldana
Frequent Visitor

need to repeat same measure value to use as denominator, % of sales calculation based on measure val

crisaldana_0-1664222624422.png

 

Total Revenue line = CALCULATE([Actuals CM],FILTER(Layout,Layout[Level 2]="TOTAL REVENUE")) -881495.70

Actuals CM = COALESCE([actuals month],[item SUBTOTAL])
new measure = DIVIDE([Actuals CM],[Total Revenue line])
 
Hello All,

reaching to all my power BI senseis  regarding  an issue that i am having with a measure.

I am looking to divide all the actuals for current month (Actuals CM) by the total revenue line for the month (total revenue line) in order to get a % of revenue measure for all items. 
I tried the to create a measure (new measure) and it works but only for 3 rows. The revenue, TOTAL Revenue, and Total lines. I am guessing because the value of -881,945.70 is not repeating down to all rows. 

how can I have all rows repeat the total revenue line figure or achieve the calculation  for all rows to divide by this value?
 
Thank you for your assistance
 
1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@crisaldana , BAsed on what I got try like

 

CALCULATE([Actuals CM],Layout[Level 2]="TOTAL REVENUE")

 

or

 

CALCULATE([Actuals CM],FILTER(all(Layout[Level 2]),Layout[Level 2]="TOTAL REVENUE"))

 

or

CALCULATE([Actuals CM],FILTER(allselected(Layout[Level 2]),Layout[Level 2]="TOTAL REVENUE"))

 

or

CALCULATE([Actuals CM],FILTER(allselected(Layout),Layout[Level 2]="TOTAL REVENUE"))

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

3 REPLIES 3
crisaldana
Frequent Visitor

Thank you all for your assistance,  your replies alone helped me understand more about filters and calculations. Thanks.

Anonymous
Not applicable

Hi  @crisaldana 

Your original formula may only show data in [level2]= "TOTAL REVENUE" or the group "TOTAL REVENUE" contained in [level1], instead of returning -881.50k per row.

like this:

vyangliumsft_1-1664246398737.png

You can try the following formula:

Total Revenue line = CALCULATE([Actuals CM],FILTER(ALL(Layout),Layout[Level 2]="TOTAL REVENUE"))

OR

Total Revenue line = CALCULATE([Actuals CM],FILTER(ALLSELECTED(Layout),Layout[Level2]="TOTAL REVENUE"))

Refer to:

ALL function (DAX) - DAX | Microsoft Learn

ALLSELECTED function (DAX) - DAX | Microsoft Learn

 

Best Regards,

Liu Yang

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

amitchandak
Super User
Super User

@crisaldana , BAsed on what I got try like

 

CALCULATE([Actuals CM],Layout[Level 2]="TOTAL REVENUE")

 

or

 

CALCULATE([Actuals CM],FILTER(all(Layout[Level 2]),Layout[Level 2]="TOTAL REVENUE"))

 

or

CALCULATE([Actuals CM],FILTER(allselected(Layout[Level 2]),Layout[Level 2]="TOTAL REVENUE"))

 

or

CALCULATE([Actuals CM],FILTER(allselected(Layout),Layout[Level 2]="TOTAL REVENUE"))

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.