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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
luissanchez
Frequent Visitor

Help with measure

Hello everyone,
Please, I would need help with a measure.
I would need a measure that multiplies the Ventas Act by Value Vent Act of each of the filter elements and then divides it by the sum of the total Vent Act.

And  the result is dynamic, depending on the selection of the filter

ejemplo Powerbi.jpg

ejemplo excel.jpg

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

I need help to use these excel formulas in Power BI.

 

Best Regards

 

 

 

1 ACCEPTED SOLUTION
v-piga-msft
Resident Rockstar
Resident Rockstar

Hi @luissanchez,

 

You could create the three measures to get your desired output.

 

1.

Act_Measure =
VAR temp =
    SUMX ( 'Sheet5', 'Sheet5'[Ventas Act] * 'Sheet5'[Valor Vent Act] )
RETURN
    DIVIDE ( temp, SUM ( 'Sheet5'[Ventas Act] ) )

 

2.

Pas_measure =
VAR temp =
    SUMX ( 'Sheet5', Sheet5[Velor Vent Pas] * 'Sheet5'[Ventas pas] )
RETURN
    DIVIDE ( temp, SUM ( Sheet5[Ventas pas] ) )

 

3.

 

Measure =
DIVIDE ( [Act_Measure] - [Pas_measure], [Act_Measure] )

 

 

Then you will get the result below.

Capture.PNG

Hope it can help you!Smiley Happy

 

Best Regards,

cherry

Community Support Team _ Cherry Gao
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-piga-msft
Resident Rockstar
Resident Rockstar

Hi @luissanchez,

 

You could create the three measures to get your desired output.

 

1.

Act_Measure =
VAR temp =
    SUMX ( 'Sheet5', 'Sheet5'[Ventas Act] * 'Sheet5'[Valor Vent Act] )
RETURN
    DIVIDE ( temp, SUM ( 'Sheet5'[Ventas Act] ) )

 

2.

Pas_measure =
VAR temp =
    SUMX ( 'Sheet5', Sheet5[Velor Vent Pas] * 'Sheet5'[Ventas pas] )
RETURN
    DIVIDE ( temp, SUM ( Sheet5[Ventas pas] ) )

 

3.

 

Measure =
DIVIDE ( [Act_Measure] - [Pas_measure], [Act_Measure] )

 

 

Then you will get the result below.

Capture.PNG

Hope it can help you!Smiley Happy

 

Best Regards,

cherry

Community Support Team _ Cherry Gao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Thank you for your help.

 

It solved the problem.

 

Smiley Very Happy

Thank you for your answer.

 

I'm going to try it...

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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