Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Hi,
I have a table with orders incl startdate and enddate
for different types of orders we have a norm for the duration of the order in workdays
Now i want to count the number of orders that have a "good" or "bad" duratation
something like this:
on time calculation =
var norm = lookupvalue(norm[norm];ordertype;ordertype)
var ontime =
calculate
countrows(orders);
filter(
calendar;datesbetween;calendar;startdate;enddate;
calendar[isworkday] = 1) < norm)
return ontime
But this didn't work
Can someone help me?
hi, @Anonymous
Sample data and expected output would help tremendously.
Please see this post regarding How to Get Your Question Answered Quickly:
https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490
And for datesbetween case, you may refer to this post:
https://community.powerbi.com/t5/Quick-Measures-Gallery/Periodic-Billing/m-p/409365
Regards,
Lin
You can populate a column in your fact. Please refer, How I have populated in dimension using the fact?
Max Sales order id = Maxx(filter(sales,Sales[item_id]='Item'[Item ID]),Sales[Order Id])
Max customer = MAXX(filter(Sales,Sales[Order Id]='Item'[Max Sales order id] && Sales[item_id]='Item'[Item ID]),Sales[Customer ID])
Even if you are sure there is one row, you need to have some aggregate function.
The information you have provided is not making the problem clear to me. Can you please explain with an example. If possible please share a sample pbix file after removing sensitive information.
Thanks
@Anonymous
Could you please post some sample data in text-tabular format? Or, ideally, share the pbix (beware of confidential data)?
Cheers,
Sturla
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.