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!To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.
Hi Everyoen,
I have a measure which calculate On time Delivery % of each supplier I use a table from our ERP system which mark each line as late in the status column if it passes the due delivery date
Solved! Go to Solution.
@Anonymous ,
You need to use FILTER function with CALCULATE
CALCULATE(DISTINCTCOUNT(Table[Suppliers]),FILTER(TABLE,[OTD%]>0.9))
CALCULATE(DISTINCTCOUNT(Table[Suppliers]),FILTER(TABLE,[OTD%]>0.9 && [OTD%]<0.8))
Regards,
Manikumar
Proud to be a Super User!
@Anonymous
Try something like this.
CALCULATE(DISTINCTCOUNT(Table[Suppliers]),[OTD%]>0.9)
CALCULATE(DISTINCTCOUNT(Table[Suppliers]),[OTD%]>0.9 && [OTD%]<0.8)
Keep OTD% data type in decimals if the above is not working with percentage.
Regards,
Manikumar
Proud to be a Super User!
When I tried this formula I got an error
"A function 'CALCULATE' has been used in a True/False expression that is used as a table filter expression. This is not allowed."
any thoughts
@Anonymous ,
You need to use FILTER function with CALCULATE
CALCULATE(DISTINCTCOUNT(Table[Suppliers]),FILTER(TABLE,[OTD%]>0.9))
CALCULATE(DISTINCTCOUNT(Table[Suppliers]),FILTER(TABLE,[OTD%]>0.9 && [OTD%]<0.8))
Regards,
Manikumar
Proud to be a Super User!
Thank you very much this actualy worked for >90 and between 90 and 85
but When I try to make one more measure for values less than 0.85 I got higher values than normal as if he counts the whole list
here's my formula
Formula is fine. That should work.
Can you reverify the count again and check.
Regards,
Manikumar
Proud to be a Super User!
@Anonymous ,
If your problem solved, can you Mark this answer as a Solution to help others.
Regards,
Manikumar
Proud to be a Super User!
@Anonymous , one way is to create measures like
> 90 = countx(filter(summarize(Table, Table[supplier], "_1",[OTD%]),[_1]>.9),[supplier])
>80 < 90 = countx(filter(summarize(Table, Table[supplier], "_1",[OTD%]),[_1]>.8 && [_1]<=.9),[supplier])
or create a Dynamic segmentation using an independent table on [OTD%]. Refer my video
User | Count |
---|---|
98 | |
75 | |
74 | |
49 | |
26 |