Forum Discussion
DAX FUNCTION HELP- Calculating SLA
- Anonymous2 years ago
Hi dheerendram ,
Please try to create measure with below dax formula:
3 Days = VAR tmp = FILTER ( ALL ( 'Table' ), [Status] = "Closed" ) VAR tmp1 = FILTER ( ALL ( 'Table' ), [Ageing] <= "3 Days" ) VAR _a = COUNTROWS ( tmp ) VAR _b = COUNTROWS ( tmp1 ) VAR _result = DIVIDE ( _b, _a ) RETURN FORMAT ( _result, "percent" )4 Days = VAR tmp = FILTER ( ALL ( 'Table' ), [Status] = "Closed" ) VAR tmp1 = FILTER ( ALL ( 'Table' ), [Ageing] <= "4 Days" ) VAR _a = COUNTROWS ( tmp ) VAR _b = COUNTROWS ( tmp1 ) VAR _result = DIVIDE ( _b, _a ) RETURN FORMAT ( _result, "percent" )Please refer the attached .pbix file.
Best regards,
Community Support Team_Binbin Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
We want to help you but your description is too vaugue. Please write it again clearly.
Provide example input data as table text (not a screen print) so we can import the data to build a solution for you.
Also provide the example desired output, with a clear description of the process flow.
Remember not to share private data ... we don't want you to get into trouble. 😧
Take time and care to use the same table and field names in the input, output and description so we can understand your problem and help you.
Try keep it simple and ask one question per ticket.
You will get a quick response if you put time, care and effort into writing clear problem descriptions.
Vaugue descriptions can waste your time and ourtime.
Look foward to helping you when the above information is forthcoming