DAX Help: Survey data (probably easy for others!)

ashleymf1983

New Member
Joined
Jul 20, 2021
Messages
1
Office Version
  1. 2016
Platform
  1. Windows
Hello All,
Brand new to DAX here.

Background: I am using dummy survey data to attempt to learn DAX. There's 4 survey questions, scored on a Likert scale ("Strongly Agree", etc). I have already recoded the Likert scale answers into codes (a scale of 1 to 4). Here's the data for one of the questions. I am trying to insert a measure to calculate the % that answered with each possible response, for each question. My start with DAX has been rocky even though I am great with Excel functions! Thanks to anyone who might be able to help!

Dummy Data:
1626798785732.png


Desired outcome:
1626798812752.png


I tried this DAX below but you'll see what's wrong with that..

divide(countrows(Table), countx(all(Table), Table[reponse]))

Incorrect result I received:

1626798869462.png


Each row should have a total of 100%, not 25%.

Thanks for any help you can offer!!
 

Excel Facts

Did you know Excel offers Filter by Selection?
Add the AutoFilter icon to the Quick Access Toolbar. Select a cell containing Apple, click AutoFilter, and you will get all rows with Apple
Welcome!

Could you please paste a sample of your data here that i can easily copy/paste so i don't have to recreate it myself?
 
Upvote 0

Forum statistics

Threads
1,213,552
Messages
6,114,278
Members
448,560
Latest member
Torchwood72

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top