How can I exclude all negative numbers from a grand total in a pivot table?

%3CLINGO-SUB%20id%3D%22lingo-sub-2843118%22%20slang%3D%22en-US%22%3EHow%20can%20I%20exclude%20all%20negative%20numbers%20from%20a%20grand%20total%20in%20a%20pivot%20table%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2843118%22%20slang%3D%22en-US%22%3E%3CP%3EI%20am%20trying%20to%20only%20include%20positive%20numbers%20in%20this%20calculation%20without%20deleting%20negative%20values%20or%20hardcoding.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22larbar110_0-1634148762921.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F317128i8678A88D4C935B45%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22larbar110_0-1634148762921.png%22%20alt%3D%22larbar110_0-1634148762921.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2843118%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EBI%20%26amp%3B%20Data%20Analysis%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EExcel%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EFormulas%20and%20Functions%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2845189%22%20slang%3D%22en-US%22%3ERe%3A%20How%20can%20I%20exclude%20all%20negative%20numbers%20from%20a%20grand%20total%20in%20a%20pivot%20table%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2845189%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F1184716%22%20target%3D%22_blank%22%3E%40larbar110%3C%2FA%3E%26nbsp%3BFor%20that%20you%20need%20to%20load%20the%20data%20to%20the%20Data%20Model%20and%20use%20a%20DAX%20measure.%20Since%20you%20do%20not%20disclose%20the%20structure%20of%20your%20own%20data%20(table%20name%2C%20column%20names%20etc.)%2C%20I%20made%20a%20small%20example%20as%20shown%20in%20the%20picture%20below.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAll%20data%20is%20stored%20in%20%22Table1%22%20and%20the%20pivot%20table%20only%20sums%20positive%20%22Values%22%20for%20each%20%22Ref%22.%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Screenshot%202021-10-14%20at%2010.21.01.png%22%20style%3D%22width%3A%20632px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F317296iE4997F3DA2D5AC1C%2Fimage-dimensions%2F632x199%3Fv%3Dv2%22%20width%3D%22632%22%20height%3D%22199%22%20role%3D%22button%22%20title%3D%22Screenshot%202021-10-14%20at%2010.21.01.png%22%20alt%3D%22Screenshot%202021-10-14%20at%2010.21.01.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2845335%22%20slang%3D%22es-ES%22%3ERe%3A%20How%20can%20I%20exclude%20all%20negative%20numbers%20from%20a%20grand%20total%20in%20a%20pivot%20table%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2845335%22%20slang%3D%22es-ES%22%3EPrepare%20your%20data%20in%20advance%2C%20create%20a%20new%20field%2C%20which%20is%20Nevative_Value%20with%20the%20values%20TRUE%20or%20False.%20Then%20in%20the%20dynamic%20table%20filter%20in%20the%20header%20by%20Negative_value%3Dfalse%3C%2FLINGO-BODY%3E
Occasional Visitor

I am trying to only include positive numbers in this calculation without deleting negative values or hardcoding.

 

larbar110_0-1634148762921.png

 

2 Replies

@larbar110 For that you need to load the data to the Data Model and use a DAX measure. Since you do not disclose the structure of your own data (table name, column names etc.), I made a small example as shown in the picture below.

 

All data is stored in "Table1" and the pivot table only sums positive "Values" for each "Ref".

Screenshot 2021-10-14 at 10.21.01.png

Prepara tus datos por anticipado, crea un nuevo campo, que sea Nevative_Value con los valores TRUE or False. Luego en la tabla dinamica filtra en el encabezado por Negative_value=false