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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
JoseLuisC
Frequent Visitor

AYUDA CON FORMULA DAX

Necesito un ayuda como proceder hacer ..

tengo una fila Ventas Neta que quiero empezar con el 100% y esa fila dividirla entre todas las demas e ir sacando su porcentaje en el campo MB .

eL VALOR a calcular es el  AÑO ACT. 

 

Como pdoria hacerlo ?? 

Captura de pantalla 2023-03-15 185026.jpg

4 REPLIES 4
v-jianboli-msft
Community Support
Community Support

Hi @JoseLuisC ,

 

Based on your description, I have modified my data:

vjianbolimsft_2-1679363652056.png

 

Please try:

MB% = 
var _a = CALCULATE(SUM('Table'[AÑO ACT]),FILTER(ALLEXCEPT('Table','Table'[Company],'Table'[Year]),[Column1]="Ventas Neta"))
return DIVIDE(SUM('Table'[AÑO ACT]),_a)

Final output:

vjianbolimsft_0-1679363613928.png

vjianbolimsft_1-1679363629295.png

 

Best Regards,

Jianbo Li

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

Hola Muchas gracias , al final lo hice con segmentacin de datos de empresa y año y use el ALLSELECTED con eso encontre lo que necesitaba 

JoseLuisC
Frequent Visitor

Hola , si funciona , pero que sucede , si yo tengo filtros como empresa y año , la variacion del porcentaje ya no empieza en 100% la columna ventas neta . 

Como podria hacer en ese caso .  Lo idea les que cuando filtre por uan empresa tambien empieze con el 100%

v-jianboli-msft
Community Support
Community Support

Hi @JoseLuisC ,

 

Based on your description, I have created a simple example:

vjianbolimsft_0-1679280347736.png

Please try:

MB% = 
var _a = CALCULATE(SUM('Table'[AÑO ACT]),FILTER(ALL('Table'),[Column1]="Ventas Neta"))
return DIVIDE(SUM('Table'[AÑO ACT]),_a)

Final output:

vjianbolimsft_1-1679280392149.png

Best Regards,

Jianbo Li

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.