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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
AdrianLock
Helper I
Helper I

Line graph showing % of feedback ratings

We have very Large dataset as part of this there are a number of tables that pull in customer feedback from our own emailed feedback form.  I initally had a line chart displaying last 15 months by month on the X axis and the number of feedback on Y with legend breaking it down by satifiaction chosen "Very good", "Good", "poor" etc.  Then forcasting next 4 months.   That was easy and I get total number of feedback.  

I've been asked to change this as a % if I do pecent of grand total I Get from 0 - 10% which is not correct.    Table below is the fact table for feedback which also has a measure insdide which counts the number of feedback rows as well. 

This table is linked with 3 other tables 1 is a datetable linked to the date field.  Then there is a dim table for OrganisationSK  which has all org names.  With a dim table for satificationSK which store all satifiaction names.

CallRefCustomerFeedback DateCustomer OrganisationSKCustomer SatisfactionSK
1001231/5/202182
1001241/5/202143
1001254/6/202131


However despite my best efforts and colleagues I'm unable to get it to give me breakdown of the monthly feedback by satisfaction.  Nearest I got was with this below.  But that just worked out the % per satifiaction each month so 100% so each month totalled 8.3% not 100%. 

 

_CustomerFeedback% =

VAR _PositiveFeedback =
   CALCULATE([Count of feedbacks], ALLEXCEPT(FB_dim_CustomerSatisfaction,FB_dim_CustomerSatisfaction[CustomerSatisfactionName]))

VAR _TotalFeedback =
calculate([Count of feedbacks],ALL(FB_fact_CustomerFeedback))

RETURN
DIVIDE(_PositiveFeedback,_TotalFeedback,0)

 

Any ideas Please been all over the web but cannot get it right 🙂

3 REPLIES 3
AdrianLock
Helper I
Helper I

Thanks for your response.  Ill anwser your questions.

 

  1. I'm not sure what you mean by this?  I've only got a chart to display the values.   With data stored in fact\dimension tables as per standard star Scheme

  2. [count of feedbacks] is count of  rows  in the table.
v-yangliu-msft
Community Support
Community Support

Hi  @AdrianLock ,

 

Can you truncate the relationship between the table and the chart so we can better help you.

What is the formula of [Count of feedbacks]

 

Best Regards,

Liu Yang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

I've managed to fix it using this however this means I have to use CustomersatisifactionSK as the ledgend which is number rather than Name which is in the Dim table 😞

_CustomerFeedback% =

 

VAR _TotalFeedback =

   CALCULATE([Count of feedbacks], ALL(FB_fact_CustomerFeedback[CustomerSatisfactionSK]))

 

VAR _Feedbackbreakdown =

[Count of feedbacks]

 

RETURN

DIVIDE(_Feedbackbreakdown,_TotalFeedback,0)

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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

Top Solution Authors