Forum Discussion
ITSME123
3 years agoNew Member
Help please, sum 1 column if another column contains certain text but ignore slicers
Hi all,
I am looking for a little help, I have a table with a column named Value, I want to sum all of the value field, if another column "Data" column contains text "Delivered" but I need it to ignore any of the multiple slicers that are onscreen.
So in short... Just return the sum of the value field for anything that is delivered in the data column, without any slicer effecting the overall figure for this field.
4 Replies
- johnt75
Super User
Try
Total delivered = CALCULATE ( SUM ( 'Table'[Value] ), REMOVEFILTERS (), TREATAS ( { "Delivered" }, 'Table'[Data] ) )- ITSME123New Member
- Hi, thanks for the reply, I have tried this and it gives a huge figure of 2.08 million, I am expecting to see around 32k. It looks like it is summing everything in the value column and not just the delivered
- johnt75
Super User
Try running the below query in DAX Studio
EVALUATE ROW ( "all rows", COUNTROWS ( 'Table' ), "filtered rows", CALCULATE ( COUNTROWS ( 'Table' ), TREATAS ( { "Delivered" }, 'Table'[Data] ) ) )That should give 2 different numbers.
- ITSME123New Member
Just awaiting the install of Dax studio then I will test, thank you