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.
Dears,
I have below table
Custid | Bulding | Land | shares | cash |
1 | 2 | 0 | 2 | 1 |
1 | 1 | 0 | 1 | 0 |
2 | 1 | 0 | 0 | 0 |
3 | 0 | 0 | 0 | 0 |
2 | 0 | 1 | 0 | 0 |
4 | 2 | 0 | 0 | 0 |
i need to create new column coll type where the expected result have to be.
Custid | Colltype |
1 | Bulding, Shares, Cash |
2 | Bulding , Land |
3 | |
4 | Bulding |
In Power Query, unpivot the data first:
You can rename your columns here, but I'll keep as 'attribute' and 'value' to make this post more generic.
Then close and apply. Create a new MEASURE:
Copying DAX from this post? Click here for a hack to quickly replace it with your own table names
Has this post solved your problem? Please Accept as Solution so that others can find it quickly and to let the community know your problem has been solved.
If you found this post helpful, please give Kudos C
I work as a Microsoft trainer and consultant, specialising in Power BI and Power Query.
www.excelwithallison.com
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 |
---|---|
72 | |
68 | |
53 | |
39 | |
33 |
User | Count |
---|---|
70 | |
63 | |
57 | |
49 | |
46 |