Excel Power Pivot with 2 measures in Value column

raysooch

New Member
Joined
Sep 11, 2020
Messages
4
Office Version
  1. 365
Platform
  1. Windows
I have an excel Power Pivot, using measures. Here is what the current output looks like. The server column is the result of a measure using a concatenatex function:

1599839101142.png


Note that the Servers exist within a Group, and that each App defined in a Group are all on the same set of Servers. To avoid the duplicate information, I would like the result to look like this:

1599839129354.png


My thought is to have 2 measures, both in the value column of the pivot table and use the appropriate DAX formulae to create the desired result. One measure would determine the Apps within a group; the other measure would determine the Servers within that same group, for the set of Apps. Is there a way to do this?

I need a way to redo my Power Pivot to match the second example.
 

Excel Facts

What is the shortcut key for Format Selection?
Ctrl+1 (the number one) will open the Format dialog for whatever is selected.
In PP, I built two measures using the DAX formula ConcatenateX. See images below.
Book1
ABC
3GroupAppXServersX
4Group AApp1sv1, sv2, sv3, sv4, sv5
5Group BApp4sv6, sv7
6Group CApp5sv8, sv9, sv10, sv11
Sheet2


EDIT: Just noticed that I got the servers right but not the Apps. Will try again and post when I get a result.
 

Attachments

  • DAX3.JPG
    DAX3.JPG
    35.4 KB · Views: 25
  • DAX2.JPG
    DAX2.JPG
    28.5 KB · Views: 26
  • DAX1.JPG
    DAX1.JPG
    28.2 KB · Views: 21
Upvote 0
What does your raw data look like before you built the PT. That may help me to get the Apps correct.
 
Upvote 0
@alansidman, your solution was PERFECT! My original data looks like this:

1600292969932.png

And the pivot out looks like this:
1600293045145.png


I even managed to figure out how to do line returns on the Appx column. You have saved my day!! Thanks so much.

Ray
 
Upvote 0
Thanks for the feedback. Glad you got what you needed.
 
Upvote 0
Solution
Okay, I have another related question. I have expanded my original data source to add a new column, DC. Each app lives on a different set of servers, in each DC. Here is a snippet of the updated data source:

1600366464745.png


Note the result:

1600366159024.png


However, by definition of this data set, all apps exist in both DCs, just on a different set of servers within a given DC...so the Appx column is duplicate for each subsequent DC. In this example, I only have 2 DCs, but the real data has more, so the duplicate columns just continue. Is there a way to write the pivot so that the dupe column is only presented once, and not duplicated for each DC? I desire the final output to look like this:
1600366230723.png

Thanks!
Ray
 
Upvote 0
Regarding the last inquiry to remove the duplicate column (because of the filter with selected DC values), I think I found a solution. I discovered the concept of "sets" in pivot tables. In a pivot table, click on Fields, Items & Sets, and then click in Create Set Based on Column Items. You will have to have filtered your original pivot on whatever filter was used, in my case the DC filter. Then within the SET, you can delete the columns that you do not desire; in my case, it was all of the Appx columns, except the first one. The other positive side affect is that I could create a separate set for each group that I was previously filtering on (DC in this case), such that in the future, when I wish to see the data within a set, just click on the specified set and the pivot table is displayed, for the filter defined within the set. A hidden gem in the complex world of Excel Power Pivot!
 
Upvote 0

Forum statistics

Threads
1,224,817
Messages
6,181,147
Members
453,021
Latest member
Justyna P

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top