Forum Discussion
RoscoeP
3 years agoFrequent Visitor
T/F Expression on Filtered & Summarized table
I have a matrix that has Account in Rows, Product in Columns, Order Total in Values, and a Slicer for Order Date with the below format. I need to sum all order totals grouped by account and produ...
FreemanZ
Super User
3 years agohi RoscoeP
do you have a table that stores all the X value? if so, try like:
Measure =
VAR _value = SUM(Table1[Order Total])
VAR _x =
MAXX(
FILTER(
Table2, Table2[Product]=MAX(Table1[Product])
),
Table2[X]
)
RETURN
IF(
_value>X,
1, 0
)
RoscoeP
3 years agoFrequent Visitor
I do have a table for X, what you suggest does provide the correct output for relevant columns/rows, however, it also causes my matrix to display all accounts including those outside of the slicer restriction.
Not sure if thats a model issue or a result of the measure. The slicer is on Salesperson which has a relationship 1 to many on sales rep number to my account table, and the account table has a 1 to many on account numbers on orders.