Forum Discussion
Segmenting Like Data From the Same Column in a Table
My fact table:
| Account | Contract | Contract Type |
| Account 1 | Exclusive | Recommended |
| Account 1 | Enhanced | Current |
| Account 2 | Balanced | Recommended |
| Account 2 | Enhanced | Current |
| Account 3 | Enhanced | Recommended |
| Account 3 | Balanced | Current |
| Account 4 | Enhanced | Recommended |
| Account 4 | Enhanced | Current |
| Account 5 | Balanced | Recommended |
| Account 5 | Enhanced | Current |
| Account 6 | Enhanced | Recommended |
| Account 6 | Cash | Current |
| Account 7 | Balanced | Recommended |
| Account 7 | Cash | Current |
I need a table that looks like this:
| Recommended Contract | Count of Recommended | Count of Current | Count of Current Balanced | Count of Current Cash | Count of Current Enhanced |
| Exclusive | 1 | 0 | 0 | 0 | 1 |
| Balanced | 3 | 1 | 0 | 1 | 2 |
| Enhanced | 3 | 4 | 1 | 1 | 1 |
I don't have issues calculating Columns B&C, but the "Count of Current" measures give me problems. Column A has to be the Recommended contracts so the entire table is in the context of recommended contracts. When I try to build my table measures out, the results are incorrect.
Any counsel is super appreciated!
2 Replies
- MFelixSuper User
Hi Amerivike ,
Not understandnig how you are maknig the transaction of the values from one column to the other in your Contract you have 4 values however in the table above you only have 3 (cash is transformed to the contract type) then you show also the count of balanced with Cash and ehanced with cahs and balanced but there is no data like that.
Can you explain a little bit better how you get to the result you are showing?
- v-cazheng-msftCommunity Support
Hi, Amerivike
What are your calculation logic for the last three columns?
According to the titles of the rows and columns you provided, I get the following result.
or
Here is the sample.
Best Regards,
Caiyun Zheng
Is that the answer you're looking for? If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.