Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
Anonymous
Not applicable

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 from the slicer upward trending, i should only see product (72203976s) which has a value of 416. the doungnut chart below refelcts the correct values in the centre circle 416, but the count of Yes and No (is wrong) it shows No as 404. Which is 14 less this might be assoicated with Yes (missing element from visual).

 

the measure i have used are in table _reportability table. What i am trying to do is calculate the number of data points that are either Yes or No or Both and those that are upward trending. 

 

pbix file https://www.dropbox.com/s/5rhg8m3dj9zb6bx/Sample__Test..v1.0.pbix?dl=0

1 ACCEPTED SOLUTION
Anonymous
Not 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])

View solution in original post

6 REPLIES 6
v-piga-msft
Resident Rockstar
Resident Rockstar

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. 

Capture.PNG

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

 

Community Support Team _ Cherry Gao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not 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])

@Anonymous  - Looks like you got it!



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
Power BI Cookbook Third Edition (Color)

DAX is easy, CALCULATE makes DAX hard...
Anonymous
Not 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..

Anonymous
Not 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"))
Anonymous
Not applicable

Hi Cherry

 

Its supposed to be 416 in total 404 as no and 14 as Yes. 

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

Find out what's new and trending in the Fabric community.