Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
Hi I am new to Power BI and I am just getting my head in it so I apologise in advance if this is a silly question. I have created 4 measures (one counts the number of 1s in a column, measure 2 counts the number of 2s etc and it carries on until number 4 eg Measure 1 = CALCULATE(countrows(table1),table1[col1]="1"). The aim is to show a stacked percentage chart. In the measure the field is hard coded as Col 1. Is there anyway of to change this so that uses the field selected or am I getting the whole idea confused?
Solved! Go to Solution.
To count number of rows dynamically based on your selected fields, you can use ALLSELECTED() function without specifying columns. It will determine your selection to filter the table.
For better understanding of ALLSELECTED(), please see: Understanding ALLSELECTED
Regards,
To count number of rows dynamically based on your selected fields, you can use ALLSELECTED() function without specifying columns. It will determine your selection to filter the table.
For better understanding of ALLSELECTED(), please see: Understanding ALLSELECTED
Regards,
User | Count |
---|---|
82 | |
79 | |
65 | |
48 | |
45 |
User | Count |
---|---|
103 | |
44 | |
39 | |
39 | |
39 |