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!Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.
I am trying to get a running total for orders with a specific description and have tried merging the YTD code with the filter code. I know both work individually, however together, the code just works like the filtering, (see the image; code is producing the dark blue "lines".) Any way to resolve this issues?
Sum of LineQty YTD 2 = IF( ISFILTERED('Sales Order with Line Detail'[CreatedOn]), ERROR("Time intelligence quick measures can only be grouped or filtered by the Power BI-provided date hierarchy or primary date column."), TOTALYTD( SUM('Sales Order with Line Detail'[LineQty]), 'Sales Order with Line Detail'[CreatedOn].[Date], FILTER('Sales Order with Line Detail', CONTAINSSTRING('Sales Order with Line Detail'[CustomerOrderNbr], " Subscription" )) ) )
Solved! Go to Solution.
Hi @kk1999 - you can create a separate calculated column with a flag, and filter based on it.
eg:
IsSubscription =
IF(CONTAINSSTRING('Sales Order with Line Detail'[CustomerOrderNbr], "Subscription"), 1, 0)
now, we can pass that flag in totalytd measure:
Sum of LineQty YTD 2 =
IF(
ISFILTERED('Sales Order with Line Detail'[CreatedOn]),
ERROR("Time intelligence quick measures can only be grouped or filtered by the Power BI-provided date hierarchy or primary date column."),
CALCULATE(
TOTALYTD(
SUM('Sales Order with Line Detail'[LineQty]),
'Sales Order with Line Detail'[CreatedOn]
),
'Sales Order with Line Detail'[IsSubscription] = 1
)
)
this work , please check
Proud to be a Super User! | |
Hi @kk1999
May I ask if you have resolved this issue? If so, please mark the helpful reply and accept it as the solution. This will be helpful for other community members who have similar problems to solve it faster.
Thank you.
Hi @kk1999 - you can create a separate calculated column with a flag, and filter based on it.
eg:
IsSubscription =
IF(CONTAINSSTRING('Sales Order with Line Detail'[CustomerOrderNbr], "Subscription"), 1, 0)
now, we can pass that flag in totalytd measure:
Sum of LineQty YTD 2 =
IF(
ISFILTERED('Sales Order with Line Detail'[CreatedOn]),
ERROR("Time intelligence quick measures can only be grouped or filtered by the Power BI-provided date hierarchy or primary date column."),
CALCULATE(
TOTALYTD(
SUM('Sales Order with Line Detail'[LineQty]),
'Sales Order with Line Detail'[CreatedOn]
),
'Sales Order with Line Detail'[IsSubscription] = 1
)
)
this work , please check
Proud to be a Super User! | |
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the September 2025 Power BI update to learn about new features.