Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

Filtering Issue doughnut Chart - TRICKY

Hi Experts   I am having trouble in getting the correct Yes and No values when selecting upward and or downward from the slicer within the attached pbix file.    Here is the problem when i select...
  • Anonymous's avatar
    Anonymous
    6 years ago

    HI CHerry this works

    DR = 
    VAR __table = SUMMARIZE(ALL(PMS_PARTS),[Product])
    VAR __table1 = ADDCOLUMNS(__table,
                     "__p-value",CALCULATE([p-value],ALL(PMS_COMPLAINT[PMSReportability])),
                            "__TAU",CALCULATE([TAU],ALL(PMS_COMPLAINT[PMSReportability])),
                                    "__trend",CALCULATE([__trend],ALL(PMS_COMPLAINT[PMSReportability])))
    VAR __table2 = FILTER(__table1,[__trend] = "Down")
    VAR __table3 = GENERATE(SELECTCOLUMNS(__table2,"__Product",[Product]),RELATEDTABLE(PMS_COMPLAINT))
    RETURN
    COUNTAX(__table3,[PMSReportability])