Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
Hi,
I have a matrix with my NPS and Number of responses by source, I wanted to add the response rate to that matrix. The problem is that there are 3 response rate measures in my model (Because I have 3 denominators for Response rate) so when I include them there is not a single response rate column/row but 2.
I need to have the response rate from different sources under the same row in this visual. This response rate is calculated in the measure level as I have my NPS data with my FeedbackSource data as column in one table and then I my denominators for the rate (visits to the web, transactions, surveys sent, etc) all by date. The problem here is that the divide is done by two different denominators, one the web visits and the other the Transactions for the QR.
As of now I calculate the response rate with the following formula:
I cannot divide by the same thing and thats why I have to add different measures. Is there any way I could achieve this? The main objective is for the matrix to display the measures as one, although there maybe more than 2. To do this I'd either have to "cheat" (like if naming them the same would make them appear in the same row) or calculate the two measures as one (but again I am dividing the feedback sources by their respective metric so its a different Denominator.
I have tried to use a VAR and Return structure. The problem is that the if doesnt work in the column level, the idea was to do something like this:
Var Web = DIVIDE(CALCULATE(COUNT('Table'[FeedbackSource]);FILTER('Table';'Table'[FeedbackSource]="Web"));SUM('Table2'[Count]);0)
Var QR = DIVIDE(CALCULATE(COUNT('Table'[FeedbackSource]);FILTER('Table';'Table[FeedbackSource]="QR"));SUM('Table2'[Count]);0)
Return
If('Table'[FeedbackSource]="Web";Web;IF('Table'[FeedbackSource]="QR;"QR").
But it wont work because the IF doesnt work with something in the context of a column.
Kind regards,
Solved! Go to Solution.
hi @J_Mug
You may need to use SELECTEDVALUE or MAX in the formula as below:
Var Web = DIVIDE(CALCULATE(COUNT('Table'[FeedbackSource]);FILTER('Table';'Table'[FeedbackSource]="Web"));SUM('Table2'[Count]);0)
Var QR = DIVIDE(CALCULATE(COUNT('Table'[FeedbackSource]);FILTER('Table';'Table[FeedbackSource]="QR"));SUM('Table2'[Count]);0)
Return
If(SELECTEDVALUE('Table'[FeedbackSource])="Web";Web;IF('Table'[FeedbackSource]="QR;"QR").
or
Var Web = DIVIDE(CALCULATE(COUNT('Table'[FeedbackSource]);FILTER('Table';'Table'[FeedbackSource]="Web"));SUM('Table2'[Count]);0)
Var QR = DIVIDE(CALCULATE(COUNT('Table'[FeedbackSource]);FILTER('Table';'Table[FeedbackSource]="QR"));SUM('Table2'[Count]);0)
Return
If(MAX('Table'[FeedbackSource])="Web";Web;IF('Table'[FeedbackSource]="QR;"QR").
If you still have the problem, please share your sample pbix file and your expected output.
Regards,
Lin
hi @J_Mug
You may need to use SELECTEDVALUE or MAX in the formula as below:
Var Web = DIVIDE(CALCULATE(COUNT('Table'[FeedbackSource]);FILTER('Table';'Table'[FeedbackSource]="Web"));SUM('Table2'[Count]);0)
Var QR = DIVIDE(CALCULATE(COUNT('Table'[FeedbackSource]);FILTER('Table';'Table[FeedbackSource]="QR"));SUM('Table2'[Count]);0)
Return
If(SELECTEDVALUE('Table'[FeedbackSource])="Web";Web;IF('Table'[FeedbackSource]="QR;"QR").
or
Var Web = DIVIDE(CALCULATE(COUNT('Table'[FeedbackSource]);FILTER('Table';'Table'[FeedbackSource]="Web"));SUM('Table2'[Count]);0)
Var QR = DIVIDE(CALCULATE(COUNT('Table'[FeedbackSource]);FILTER('Table';'Table[FeedbackSource]="QR"));SUM('Table2'[Count]);0)
Return
If(MAX('Table'[FeedbackSource])="Web";Web;IF('Table'[FeedbackSource]="QR;"QR").
If you still have the problem, please share your sample pbix file and your expected output.
Regards,
Lin
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
64 | |
55 | |
53 | |
36 | |
34 |
User | Count |
---|---|
85 | |
73 | |
55 | |
45 | |
43 |