The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
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
User | Count |
---|---|
82 | |
81 | |
36 | |
32 | |
32 |
User | Count |
---|---|
93 | |
79 | |
62 | |
54 | |
51 |