Hello @seunao,
Firstly, please absolutely don’t apologise. On the forum, all the questions are welcomed here. When members ask questions onto the Forum we also learn something from them. No question is small here.
Now, when I said I used the technique to achieve the results just by writing 2 measures or 1 single consolidated measure it meant that it’s the best possible and feasible way. Let’s presume you’ve large model than what will you do? Will you go for 2 measures that optimizes your model or will you for individual measures that makes your model further bulky.
To achieve same results I’ve written 13 measures. Now, I leave the choice upto you which option suits you the better.
Note: I’m vocal and do advocate the “Measure Branching Technique” onto the forum but not at the cost of the model size. The solution which I provided earlier also showcased “Measure Branching Technique” as well as “Variable Technique”. Now, here’re the 13 measures provided for your reference.
1). Count Of Has Breached -
Count Of Has Breached = COUNTROWS( SLA )
2). Overall Total No. Of True In SLA Table -
Overall Total No. Of True In SLA Table =
CALCULATE( COUNTROWS( SLA ) ,
SLA[Has breached] = "TRUE" )
3). Overall Total No. Of False In SLA Table -
Overall Total No. Of False In SLA Table =
CALCULATE( COUNTROWS( SLA ) ,
SLA[Has breached] = "FALSE" )
4). Total No. Of True Matched Between SLA and Incident Table -
Total No. Of True Matched Between SLA and Incident Table =
CALCULATE( COUNTROWS( SLA ) ,
FILTER( SLA ,
SLA[Task] = RELATED( Incident[Number] ) ) ,
SLA[Has breached] = "TRUE" )
5). Total No. Of False Matched Between SLA and Incident Table -
Total No. Of False Matched Between SLA and Incident Table =
CALCULATE( COUNTROWS( SLA ) ,
FILTER( SLA ,
SLA[Task] = RELATED( Incident[Number] ) ) ,
SLA[Has breached] = "FALSE" )
6). Count Of Closed State -
Count Of Closed State =
CALCULATE( COUNTROWS( SLA ) ,
FILTER( SLA ,
SLA[Task] = RELATED( Incident[Number] ) ) ,
Incident[State] = "Closed" )
7). Count Of Resolved State -
Count Of Resolved State =
CALCULATE( COUNTROWS( SLA ) ,
FILTER( SLA ,
SLA[Task] = RELATED( Incident[Number] ) ) ,
Incident[State] = "Resolved" )
8). Count Of Word Resolution -
Count Of Word Resolution =
CALCULATE( COUNTROWS( SLA ) ,
FILTER( SLA ,
SLA[Task] = RELATED( Incident[Number] ) ) ,
CONTAINSSTRING( SLA[SLA definition] , "resolution" ) )
9). Count Of Word Response -
Count Of Word Response =
CALCULATE( COUNTROWS( SLA ) ,
FILTER( SLA ,
SLA[Task] = RELATED( Incident[Number] ) ) ,
CONTAINSSTRING( SLA[SLA definition] , "response" ) )
10). Count Of Resolved on time - As per Point No. 5 - FALSE condition -
Count Of Resolved on time - As per Point No. 5 - FALSE condition =
CALCULATE( COUNTROWS( SLA ) ,
FILTER( SLA ,
SLA[Task] = RELATED( Incident[Number] ) ) ,
SLA[Has breached] = "FALSE" ,
CONTAINSSTRING( SLA[SLA definition] , "resolution" ) ,
SLA[Stage] = "Completed" )
11). % of Response - As per Point 5 - FALSE condition -
% of Response - As per Point 5 - FALSE condition =
DIVIDE(
[Count Of Resolved on time - As per Point No. 5 - FALSE condition] ,
CALCULATE( [Count Of Resolved on time - As per Point No. 5 - FALSE condition] ,
ALLSELECTED( SLA ) ) ,
0 )
12). Count Of Resolved on time - As per Point No. 5 - TRUE condition -
Count Of Resolved on time - As per Point No. 5 - TRUE condition =
CALCULATE( COUNTROWS( SLA ) ,
FILTER( SLA ,
SLA[Task] = RELATED( Incident[Number] ) ) ,
SLA[Has breached] = "TRUE" ,
CONTAINSSTRING( SLA[SLA definition] , "resolution" ) ,
SLA[Stage] = "Completed" )
13). % of Response - As per Point 5 - TRUE condition -
% of Response - As per Point 5 - TRUE condition =
DIVIDE(
[Count Of Resolved on time - As per Point No. 5 - TRUE condition] ,
CALCULATE( [Count Of Resolved on time - As per Point No. 5 - TRUE condition] ,
ALLSELECTED( SLA ) ) ,
0 )
Now, after writing all these measure they simply provide the same results like they were providing it before. Below are the screenshots provided for the reference -
So if they provide the same results. I would like to ask you what’s the point of writing this many measures? How will they actually help in your analysis like you’ve suggested in your previous post? As I said the choice is yours whichever option suits you the better.
I’m attaching the working of the PBIX file for the reference. And in the file refer the section of “Individual Measures”.
Lastly, you can keep the thread open as long as you wish. But if the query differs from the original query than it’ll violate the forum rules because only one query is allowed per thread. So again choice is yours here as well.
Hoping you find this measures useful and helpful and meets your requirements that you’ve been looking for.
Thanks and Warm Regards,
Harsh
sampledata - Harsh v2.pbix (76.6 KB)