Microsoft Fabric Community Conference 2025, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount.
Register nowThe Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.
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
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.
If you love stickers, then you will definitely want to check out our Community Sticker Challenge!
User | Count |
---|---|
22 | |
17 | |
17 | |
11 | |
7 |
User | Count |
---|---|
27 | |
26 | |
12 | |
12 | |
12 |