Forum Discussion
Issue with Divide in Summarize table
- 2 years ago
% Bug Fixes = var a = ADDCOLUMNS(SUMMARIZE ( Tickets, [Created Year], [Created Week]), "Incidents", CALCULATE(COUNTROWS (Tickets),Tickets[Issue Type] = "Incident"), "# of Tickets", CALCULATE(COUNTROWS (Tickets),Tickets[Issue Type] in { "Incident", "Service request"}) ) return ADDCOLUMNS(a,"% Bug Fixes_Msr",DIVIDE([Incidents],[# of Tickets]))
Thanks lbendlin for your response. I do not want to bring in "Incidents" and "# of tickets" into summarized table. I just want to do the actual calculation and use it in the visual.
Thanks,
Phani
I thought that is what I provided. Please clarify what you are trying to achieve.
- PS_782 years agoHelper II
Thanks for the quick response again. The solution you suggested is getting "Incidents" and "Total # of Tickets" in the summarized table and created measure within summarized table to calculate "% Bug Fixes_Msr". What I am trying to achieve is calculating "% Bug Fixes" within Summarized table itself.
In addition, the summarized table, "% Bug Fixes" is yielding incorrect ticket count. For example, Week W01 has only 7 bugs and 24 total tickets where as summarized table doubles it.
Thanks,
Phani
- lbendlin2 years agoSuper User
% Bug Fixes = var a = ADDCOLUMNS(SUMMARIZE ( Tickets, [Created Year], [Created Week]), "Incidents", CALCULATE(COUNTROWS (Tickets),Tickets[Issue Type] = "Incident"), "# of Tickets", CALCULATE(COUNTROWS (Tickets),Tickets[Issue Type] in { "Incident", "Service request"}) ) return ADDCOLUMNS(a,"% Bug Fixes_Msr",DIVIDE([Incidents],[# of Tickets]))- PS_782 years agoHelper II
Thanks a lot lbendlin . This sounds great. I will accept this as a solution. But, is there any way, I can skip "Incidents" and "# of Tickets" from returning? I mean to ask, can we put count of Incidents / # of tickets in separate variables and use them in DIVIDE?
Thanks,
Phani