Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
hi guys,
I have a csv that has several columns containing strings e.g. apple;banana;orange;apple
the strings are outputs from a list of over 200 potential 'fruits' so I cannot name individually within the code
Is it possible to write a dynamic DAX code to extract the total number of fruits per column as well as total number of fruits by fruit
i would like to be able to output a simple bar chart like below
Solved! Go to Solution.
I would recommend to not use DAX for this, but to unpivot the columns when loading the data, e.g. using power query.
https://learn.microsoft.com/en-us/power-query/unpivot-column
I would recommend to not use DAX for this, but to unpivot the columns when loading the data, e.g. using power query.
https://learn.microsoft.com/en-us/power-query/unpivot-column
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 8 | |
| 6 | |
| 4 | |
| 4 | |
| 4 |
| User | Count |
|---|---|
| 25 | |
| 17 | |
| 8 | |
| 8 | |
| 7 |