Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
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
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
18 | |
15 | |
14 | |
11 | |
8 |
User | Count |
---|---|
24 | |
19 | |
12 | |
11 | |
10 |