Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hi,
I am trying to filter one factTable with a variable table of another filtered factTable.
Problem is IN VALUES doesnt accept a vTable.
I have tried INTERSECT but not really sure how to complete it with that.
The goal is to SUM up all timestampes in
FactWorkShopStampings[StampedTime]
where
FactWorkShopStampings[OrderNumber]
This is what I tried
WeekRpt - UnInvoiced - Stamped Time_Single =
VAR _LastTransferDate = MAX( FactUnInvoicedWorkShopOrderRow[EventDate] )
VAR __TempTable =
CALCULATETABLE(
SELECTCOLUMNS( FactUnInvoicedWorkShopOrderRow,
"COSTCENTER", LOOKUPVALUE( CostCenter[CosterCenterIDShort], CostCenter[Department_KEY], FactUnInvoicedWorkShopOrderRow[Department_KEY] ),
"ORDERNUMBER", FactUnInvoicedWorkShopOrderRow[OrderNumber],
"EVENTDATE", FactUnInvoicedWorkShopOrderRow[EventDate]
),
FILTER(
FactUnInvoicedWorkShopOrderRow ,
FactUnInvoicedWorkShopOrderRow[EventDate] = _LastTransferDate
)
)
VAR __TempTableGroupBy =
GROUPBY (
__TempTable,
[COSTCENTER],
[ORDERNUMBER],
[EVENTDATE]
)
VAR _SumStapedTime =
CALCULATE (
SUM( FactWorkShopStampings[StampedTime] ),
FILTER ( ALL( FactWorkShopStampings ) ,
FactWorkShopStampings[OrderNumber] IN VALUES( __TempTableGroupBy[ORDERNUMBER] )
)
)
RETURN
_SumStapedTime
Hi @kmansweden ,
You can update the formula of measure [WeekRpt - UnInvoiced - Stamped Time_Single] as below and check if it can return the expected result...
WeekRpt - UnInvoiced - Stamped Time_Single =
VAR _LastTransferDate =
MAX ( FactUnInvoicedWorkShopOrderRow[EventDate] )
VAR __TempTable =
CALCULATETABLE (
VALUES ( FactUnInvoicedWorkShopOrderRow[OrderNumber] ),
FILTER (
FactUnInvoicedWorkShopOrderRow,
FactUnInvoicedWorkShopOrderRow[EventDate] = _LastTransferDate
)
)
VAR _SumStapedTime =
CALCULATE (
SUM ( FactWorkShopStampings[StampedTime] ),
FILTER (
ALL ( FactWorkShopStampings ),
FactWorkShopStampings[OrderNumber] IN __TempTable
)
)
RETURN
_SumStapedTime
Best Regards
Check out the July 2025 Power BI update to learn about new features.
User | Count |
---|---|
23 | |
8 | |
7 | |
6 | |
6 |
User | Count |
---|---|
28 | |
12 | |
10 | |
10 | |
6 |