Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! It's time to submit your entry. Live now!
Hi All,
I need to create a Line and Stacked chart for which multiple columns will be derived using the following conditions:
Table name: Survey
Steps/Logic:
calculate the no. of surveys
Group by Support Group
Get the total count of rows
Sort the values by total responded surveys
Select only Top 50% = hence total rows/2
Take the 50% rows
Sort it by highest % negative response
Now display top 5 values in the chart
Example data
| Group | # of survey | Negative response % |
| A | 148 | 0.68% |
| B | 67 | 1.49% |
| E | 19 | 5.26% |
| H | 38 | 2.63% |
| C | 37 | 2.70% |
| G | 705 | 0.99% |
| D | 17 | 5.88% |
| F | 32 | 3.13% |
| H | 5 | 20.00% |
| L | 6 | 16.67% |
| K | 11 | 9.09% |
| N | 24 | 8.33% |
| I | 20 | 10.00% |
| J | 109 | 4.59% |
| M | 130 | 1.54% |
Solved! Go to Solution.
@Anonymous solution attached, look at table1 in attached, it has few columns and measures. you can play with it as per your need, didn't had much time to work on it thou but I guess you will get idea from it.
Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!
Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo
If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤
Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.
@Anonymous will this "% negative response" will be aggregated for final output?
Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!
Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo
If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤
Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.
@Anonymous is this expected output?
Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!
Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo
If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤
Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.
Exactly!!! Am I missing something? I tried multiple ways but I am in one step behind the solution. Can you please explain?
@Anonymous solution attached, look at table1 in attached, it has few columns and measures. you can play with it as per your need, didn't had much time to work on it thou but I guess you will get idea from it.
Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!
Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo
If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤
Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.
Hi @parry2k
The below doesn't work and the Y/N column is empty for my case:
#_TOP =
var x = TOPN([TOTAL_ROWS], VALUES('Table'[A), [B], DESC)
RETURN
IF('Table'[A] IN x, "Y")Table is the table name, A, B are the columns. B is the column need to be sorted. Total_Rows is the rows to be taken in Top N.
Once I get the results, I need to rank the result set by Column C and get only Top 5 Rank. Can you please help on this issue? Thanks!
@Anonymousdoes the solution attached previosuly is not working?
Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!
Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo
If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤
Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.
Hi @parry2k
Thank you for the reply. I am getting ciurcular dependency 😞
Below are the 2 screenshots for your reference.
The table is created using a DAX expression which is as below:
Table =
VAR current_month= [#_LATEST_MONTH]
RETURN
SUMMARIZE(CUSTSURVEY, CUSTSURVEY[ASSIGNEE_SUPPORT_GROUP],
"#_of_Survey",
CALCULATE(COUNT(CUSTSURVEY[ENTRY_ID]), FILTER(CUSTSURVEY, [#_GET_MONTH_AND_YEAR] = current_month && [#_IS_SURVEY_RESPONDED] = "Yes")),
"% Negative Reviews",
(CALCULATE (
COUNT ('CUSTSURVEY'[ENTRY_ID]),
FILTER (
'CUSTSURVEY',
(
'CUSTSURVEY'[#_GET_MONTH_AND_YEAR] = current_month
&& (('CUSTSURVEY'[OVERALL_EXP] = 0)||('CUSTSURVEY'[OVERALL_EXP] = 1))
&& NOT ISBLANK ('CUSTSURVEY'[OVERALL_EXP])
)
)
)
/ CALCULATE (
COUNT ( 'CUSTSURVEY'[ENTRY_ID] ),
FILTER (
'CUSTSURVEY',
( 'CUSTSURVEY'[#_GET_MONTH_AND_YEAR] = current_month
&& ( 'CUSTSURVEY'[#_IS_SURVEY_RESPONDED] = "Yes" ) )
)
)
)
)Can you tell me what am missing? Thanks!
@Anonymous when you get chance, can you PM me?
Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!
Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo
If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤
Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.
The Power BI Data Visualization World Championships is back! It's time to submit your entry.
Check out the January 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 69 | |
| 45 | |
| 36 | |
| 28 | |
| 23 |
| User | Count |
|---|---|
| 135 | |
| 121 | |
| 58 | |
| 40 | |
| 32 |