Supplies are limited. Contact info@espc.tech right away to save your spot before the conference sells out.
Get your discountScore big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount
hi i have a measure that take all the [sihpped product - return product ]
this is the measure :
INB=
var _MaxDate = MAX(DimDate[Date])
VAR _INB =
CALCULATE(
CALCULATE(
CALCULATE(COUNT('FACT'[DOCDES]),
FILTER('FACT', 'FACT'[DOCDES] = "Shipped"),FILTER(DimDate,DimDate[Date]<=_MaxDate)),ALL(DimDate))
-
CALCULATE(
CALCULATE(COUNT('FACT'[DOCDES]),
FILTER('FACT', 'FACT'[DOCDES] = "return"),FILTER(DimDate,DimDate[Date]<=_MaxDate)),ALL(DimDate))
)
RETURN
IF(_INB<0, BLANK(), _INB)
part name (from dim parts) | INB |
x | 3 |
total | 3 |
part name (from dim parts) | customer name | INB |
x | 1 | 1 |
x | 2 | 1 |
x | 3 | 5 |
total |
| 3 |
Hi, @Anonymous
Can you provide some source data for testing? It can be an excel picture or a simple pbix document to remove sensitive information.
Look forward to your reply.
Best Regards,
Community Support Team _Charlotte
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@Anonymous , Try like
INB=
var _MaxDate = MAX(DimDate[Date])
VAR _INB =
CALCULATE(COUNT('FACT'[DOCDES]),
FILTER('FACT', 'FACT'[DOCDES] = "Shipped"),FILTER(ALL(DimDate),DimDate[Date]<=_MaxDate))
-
CALCULATE(COUNT('FACT'[DOCDES]),
FILTER('FACT', 'FACT'[DOCDES] = "return"),FILTER(ALL(DimDate),DimDate[Date]<=_MaxDate))
RETURN
sumx(values(parts[part name]), IF(_INB<0, BLANK(), _INB) )
it not working,
i'm getiing blank
User | Count |
---|---|
13 | |
10 | |
8 | |
7 | |
5 |
User | Count |
---|---|
24 | |
16 | |
15 | |
10 | |
7 |