cancel
Showing results for
Did you mean:

## Exclude count of a specific data in the total of an array

Hi all 😁

I currently have a matrix in which I group and show the total of a series of values, but I have a problem 😭 and I hope you can help me.

What I want is that of the total value generated exclude from the sum a specific row but that additionally this row is visible (ie do not remove the row only omit from the total count) as you can see in the attached image within that total "26" should not add the value "9" ie the value I should show is 17

1 ACCEPTED SOLUTION
Community Support

Check my example, you can use the below HASONEVALUE() function to ignore morning in the Total.

Measure = IF(HASONEVALUE('Table'[Value]),SUM('Table'[Value]),CALCULATE(SUM('Table'[Value]),FILTER('Table',[Time of Day]<>"Morning")))

Paul Zheng _ Community Support Team
If this post helps, please Accept it as the solution to help the other members find it more quickly.

4 REPLIES 4
Community Support

Check my example, you can use the below HASONEVALUE() function to ignore morning in the Total.

Measure = IF(HASONEVALUE('Table'[Value]),SUM('Table'[Value]),CALCULATE(SUM('Table'[Value]),FILTER('Table',[Time of Day]<>"Morning")))

Paul Zheng _ Community Support Team
If this post helps, please Accept it as the solution to help the other members find it more quickly.

Super User

First, create a total  measure

Assuming column is row or group by or axis

total measure = calculate(sum(Table[Value]), filter(allselected(Table, not(Table[column] in {"Nuevous En el Mes"}))))

Shift measure = if(isinscope(Table[column]) , sum(Table[Value]) , [total measure])

Shift measure you have use. You can more columns in if to check isinscope if needed

https://www.kasperonbi.com/use-isinscope-to-get-the-right-hierarchy-level-in-dax/

Learn Power BI - Full Course with Dec-2022, with new DAX functions like Window, Index, Offset !!
Did I answer your question? Mark my post as a solution! Appreciate your Kudos !! Proud to be a Super User! !!
Formatted Profit and Loss Statement with empty lines

Up, porfa someone who can help me

Super User

You can find the solution for that on the below link;

Regards,

Sanket Bhagwat.

Announcements

#### 2023 Release Wave 1 Plans

Power BI release plans for 2023 release wave 1 describes all new features releasing from April 2023 through September 2023.

#### Global Power BI Training

Make sure you register today for the Power BI Summit 2023. Don't miss all of the great sessions and speakers!

#### 2022 Monthly Feature Releases

We had a great 2022 with a ton of feature releases to help you drive a data culture.

Top Solution Authors
Top Kudoed Authors