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!Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Hi there ;
I need your support for below issue ;
i have a table as below , i just try to compare reuest date and Quantity vs. confirmation date and qty . İf confirmation quantities compares request quantities on time , then i want to get " close " statu with a mesaure . I can not create a column because i am working on azure server with a live data. so i need a measure i think.
So which rules will work ;
So for below sample imagine that we are in january 2021 now.And we are opening report today , our measure will calculate statu of order like that ;
System will calculate based on order line , but will give only one result based on order ( i will explain soon ) , so as you see below , in an order line , if the request date is in this actual month or earlier system will took that order qty , and will compare with confirmation qty and date , if in the same line request qty total is equal with confirmation qty and if the confirmation date is in the actual month that we are opening the report so this line statu will be for us closed.As you see for all lines based on one order number all of them has closed statu . So if an order's all lines calculated closed statu i want from system to give with a measure that order1 statu is closed .
this will work only for the orders whcih one's all lines has "Closed" statu and available for the rule that i mebtioned above .If the one of line will not have this rules that order statu will be "Opened"
i hope it is clear thanks in advance for your kind supports
Solved! Go to Solution.
Try to create a flag measure first to see whether each line matches the condition, I am not sure about the condition you wrote that is a bit confuse to me, but the flag measure can be something like:
Match condition? = IF(MAX([Request Date].[MonthNo])<=MAX([Confirmation Date].[MonthNo])
|| MAX([Request Date])<=MAX([Confirmation Date])
&& MAX([Order Quantity])=MAX([Confirmation Quantiy]),TRUE(),FALSE())
Then you can create the status measure to check whether all line are true:
Status =
var countall_ = CALCULATE(COUNTROWS('Table'),FILTER(ALL('Table'),[Order Number]=MAX([Order Number])))
var countclose = CALCULATE(COUNTROWS('Table'),FILTER(ALL('Table'),[match condition]=TRUE()),FILTER(ALL('Table'),[Order Number]=MAX([Order Number])))
Return IF(countclose=countall_,"Close","Open")
Paul Zheng _ Community Support Team
If this post helps, please Accept it as the solution to help the other members find it more quickly.
Try to create a flag measure first to see whether each line matches the condition, I am not sure about the condition you wrote that is a bit confuse to me, but the flag measure can be something like:
Match condition? = IF(MAX([Request Date].[MonthNo])<=MAX([Confirmation Date].[MonthNo])
|| MAX([Request Date])<=MAX([Confirmation Date])
&& MAX([Order Quantity])=MAX([Confirmation Quantiy]),TRUE(),FALSE())
Then you can create the status measure to check whether all line are true:
Status =
var countall_ = CALCULATE(COUNTROWS('Table'),FILTER(ALL('Table'),[Order Number]=MAX([Order Number])))
var countclose = CALCULATE(COUNTROWS('Table'),FILTER(ALL('Table'),[match condition]=TRUE()),FILTER(ALL('Table'),[Order Number]=MAX([Order Number])))
Return IF(countclose=countall_,"Close","Open")
Paul Zheng _ Community Support Team
If this post helps, please Accept it as the solution to help the other members find it more quickly.
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 |
|---|---|
| 103 | |
| 80 | |
| 59 | |
| 51 | |
| 46 |