Forum Discussion
Filtering Issue doughnut Chart - TRICKY
- Anonymous6 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])
Hi Anonymous ,
Firstly, do you only have the incorrect value when selected value is Upward?
If yes, please check if the filter condition in the UP measure is correct as I'm not clear about your logic.
In addition, by my research on your pbix, if we highlight the 404 , it will show the right value like below.
Last but mot least, please note that do not share your actual data here, always do mask the sensitive data before uploading.
Best Regards,
Cherry
- Anonymous6 years agoNot applicable
Hi Cherry
Its supposed to be 416 in total 404 as no and 14 as Yes.
- Anonymous6 years agoNot applicable
HI Cherry
if you add the following measure into the matrix table you'll the total is correct all the time. Just the Dougnut chart errors...
NO = CALCULATE(COUNTROWS(PMS_COMPLAINT),FILTER(PMS_COMPLAINT,PMS_COMPLAINT[PMSReportability]="No"))
YES = CALCULATE(COUNTROWS(PMS_COMPLAINT),FILTER(PMS_COMPLAINT,PMS_COMPLAINT[PMSReportability]="Yes"))
- Anonymous6 years agoNot applicable
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])- Greg_Deckler6 years agoCommunity Champion
Anonymous - Looks like you got it!
- Anonymous6 years agoNot applicable
thanks Greg
have a great weekend and enjoy the free time before teh next book. Keep us update if the DAX book is geared more towards Data Science Calculations etc..