Pivot Count

blue1406

New Member
Joined
Apr 13, 2014
Messages
1
I am new to Powerpivot/DAX and can't figure out how to do the following.
I have an issues database that I imported into Powerpivot for dashboard reporting.
Each issue has a value for 'WE opened' and 'WE closed' (WE = week ending). I want to report on WE and how many issues have been opened/closed.
Here is a simplified example:

Source (Powerpivot table):[TABLE="width: 500"]
<tbody>[TR]
[TD]WE Opened[/TD]
[TD]WE Closed[/TD]
[/TR]
[TR]
[TD]4/6/2014[/TD]
[TD]4/13/2014[/TD]
[/TR]
[TR]
[TD]4/6/2014[/TD]
[TD]4/13/2014[/TD]
[/TR]
[TR]
[TD]4/13/2014[/TD]
[TD]4/13/2014[/TD]
[/TR]
</tbody>[/TABLE]


Pivot Table Report:
[TABLE="width: 500"]
<tbody>[TR]
[TD]WE[/TD]
[TD]Count Opened[/TD]
[TD]Count Closed[/TD]
[/TR]
[TR]
[TD]4/6/2014[/TD]
[TD]2[/TD]
[TD]0[/TD]
[/TR]
[TR]
[TD]4/13/2014[/TD]
[TD]1[/TD]
[TD]3[/TD]
[/TR]
</tbody>[/TABLE]
 

Excel Facts

Workdays for a market open Mon, Wed, Friday?
Yes! Use "0101011" for the weekend argument in NETWORKDAYS.INTL or WORKDAY.INTL. The 7 digits start on Monday. 1 means it is a weekend.
If you normalise the data, life will be easier. So have two fields : WE and OpenCloseStatus. First three entries are the WE open dates and "Opened" next three are the WE closed dates and "Closed"

Maybe you can do that via SQL? Something like : SELECT [WE Opened] AS [WE], 'Opened' AS [OpenCloseStatus] FROM sourcedata UNION SELECT [WE Closed], 'Closed' FROM sourcedata
 
Upvote 0

Forum statistics

Threads
1,223,992
Messages
6,175,823
Members
452,672
Latest member
missbanana

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