Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hi.
I have an issue with adding a second filter to my formula.
Before I added the second filter, the formula was error free.
Solved! Go to Solution.
Hi @RogueTrooper ,
According to your description, in your formula, in the FILTER function, you can only directly reference columns in the current table or other measures. When you enter a single quote, it automatically pops up which can only be quoted like below:
I create a sample.
MNSalesOrderLine table:
MNSalesOrderHdr table:
LastRefreshedDate table:
Modify the measure like this:
ALL OS VALUE PERIOD =
CALCULATE (
SUM ( MNSalesOrderLine[OS LCY Value] ),
USERELATIONSHIP ( MNSalesOrderHdr[No], MNSalesOrderLine[Document_No] ),
FILTER (
MNSalesOrderLine,
MNSalesOrderLine[Shipment_Date]
<= EOMONTH ( MAX ( LastRefreshedDate[DateLastRefreshed] ), 0 )
&& MAXX (
FILTER (
'MNSalesOrderHdr',
'MNSalesOrderHdr'[No] = EARLIER ( 'MNSalesOrderLine'[Document_No] )
),
'MNSalesOrderHdr'[Status]
) = "RELEASED"
)
)
Get the correct result.
I attach my sample below for reference.
Best Regards,
Community Support Team _ kalyj
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @RogueTrooper ,
According to your description, in your formula, in the FILTER function, you can only directly reference columns in the current table or other measures. When you enter a single quote, it automatically pops up which can only be quoted like below:
I create a sample.
MNSalesOrderLine table:
MNSalesOrderHdr table:
LastRefreshedDate table:
Modify the measure like this:
ALL OS VALUE PERIOD =
CALCULATE (
SUM ( MNSalesOrderLine[OS LCY Value] ),
USERELATIONSHIP ( MNSalesOrderHdr[No], MNSalesOrderLine[Document_No] ),
FILTER (
MNSalesOrderLine,
MNSalesOrderLine[Shipment_Date]
<= EOMONTH ( MAX ( LastRefreshedDate[DateLastRefreshed] ), 0 )
&& MAXX (
FILTER (
'MNSalesOrderHdr',
'MNSalesOrderHdr'[No] = EARLIER ( 'MNSalesOrderLine'[Document_No] )
),
'MNSalesOrderHdr'[Status]
) = "RELEASED"
)
)
Get the correct result.
I attach my sample below for reference.
Best Regards,
Community Support Team _ kalyj
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
ALL OS VALUE PERIOD =
CALCULATE(
SUM(MNSalesOrderLine[OS LCY Value]),
USERELATIONSHIP(
MNSalesOrderHdr[No],
MNSalesOrderLine[Document_No]
),
filter(
MNSalesOrderLine,
MNSalesOrderLine[Shipment_Date] <=EOMONTH(MAX(LastRefreshedDate[DateLastRefreshed]),0) && MNSalesOrderHdr[Status] = "RELEASED"
)
)
that table name is incorrect.
Do you mean:
ALL OS VALUE PERIOD =
If(
MNSalesOrderHdr[Status] = "RELEASED",
CALCULATE(
SUM(MNSalesOrderLine[OS LCY Value]),
USERELATIONSHIP(
MNSalesOrderHdr[No],
MNSalesOrderLine[Document_No]
),
filter(
MNSalesOrderLine,
MNSalesOrderLine[Shipment_Date] <=EOMONTH(MAX(LastRefreshedDate[DateLastRefreshed]),0)
)
),
blank()
)
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
| User | Count |
|---|---|
| 20 | |
| 10 | |
| 9 | |
| 4 | |
| 4 |
| User | Count |
|---|---|
| 34 | |
| 31 | |
| 19 | |
| 12 | |
| 10 |