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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Jsilva96
Regular Visitor

Help with DAX

Hello everyone. I would like help with an issue on DAX formulas. (Here the link of the files https://www.transfernow.net/dl/202402077f1pJs0i)

Actually i have on a sheet the assistance of the people for each area (which are "packing carozo", "packing d'agen", "packing hand pack" with this i calculate the productivity of the group of people (all of this are in the PBI file) and use it on a line graph besides the assitance of the "area" (called it "dot_total") and the people related to certain jobs of the same area (called it "dot_emb"). 

As you will see, the formula for "dot_total" is "Dot_total = [dot_total_carozo]+[Dot_total_d'agen]+[dot_total_hand pack]+[dot_total_packing]"

and the formula for each component of dot total is, for example, "
dot_total_carozo = average('Resumen_Bines_por proceso'[dotacion_total_ingreso_carozo])" and again, this one utilize a column wich i created with the following formula

"

dotacion_total_ingreso_carozo =
SUMX(
    FILTER(
        INGRESO,
        SWITCH(
            TRUE(),
            INGRESO[FECHA] <> 'Resumen_Bines_por proceso'[Fecha Proceso], FALSE(),
            INGRESO[TURNO] <> 'Resumen_Bines_por proceso'[TURNO], FALSE(),
            NOT INGRESO[AREA] IN {"PACKING CAROZO"}, FALSE(),
            TRUE()
        )
    ),
    INGRESO[ASISTENCIA]
)"

 

So well, my problem is that the assistant for each area (dot total) is adding to the another areas, you can see this on the days where "packing carozo" match with another area of "packing" so they are adding their assistences. I set the filter of "AREA" that comes of the same table wich i take the quantity of assistans for each area and i would like to filter this to separate each result of area.

Im really sorry for my english, if you doesn't understand please reply me. Thank you for your help beforehand, greetings 

2 REPLIES 2
Jsilva96
Regular Visitor

when i use the DAX that you provide me, the column doesn't filter "packing carozo" instead of that the column "dotacion_total_ingreso_carozo" adds the assistance of tha another areas, it's clearly in the following screenshot:


Jsilva96_2-1707392136091.png

 

Jsilva96_1-1707392086132.png


As you can see, the value represent all the assistance of the shift "1" and it should be only for "packing carozo". With the formula that i used it worked for filter this, but, the problem is my DAX called "Dot_total" doesnt make any filter and just add the differents areas. "Dot_total = [dot_total_carozo]+[Dot_total_d'agen]+[dot_total_hand pack]+[dot_total_packing]" so when it comes to the graph, it graphs the value of the sum of all, which isn't exactly bad but i cannot filter after with the filter that i mark called "AREA". 

Thank you for your help. 

Anonymous
Not applicable

Hi @Jsilva96 ,

Try to use  this DAX:

dotacion_total_ingreso_carozo = 
SUMX(
    FILTER(
        INGRESO,
        SWITCH(
            TRUE(),
            INGRESO[FECHA] <> 'Resumen_Bines_por proceso'[Fecha Proceso], FALSE(),
            INGRESO[TURNO] <> 'Resumen_Bines_por proceso'[TURNO], FALSE(),
            INGRESO[AREA] IN {"PACKING CAROZO"}, TRUE(),  -- Explicitly filter for "PACKING CAROZO"
            TRUE()
        )
    ),
    INGRESO[ASISTENCIA]
)

The final output is shown in the following figure:

vxiandatmsft_0-1707356335210.png

Best Regards,

Xianda Tang

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

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.