The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.
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 |
---|---|
70 | |
67 | |
62 | |
48 | |
28 |
User | Count |
---|---|
113 | |
77 | |
65 | |
55 | |
43 |