Quantcast
Channel: Power Pivot forum
Viewing all 4715 articles
Browse latest View live

Is it possible to dynamically filter a moving total measure in DAX.

$
0
0

Hello,

Wondering if there is a way to create a measure that filters the second column to mimic the behavior of only filtering for slicer for the Open Pool Date values as per the image below. Ultimately, I need to create a measure that only includes accounts that were opened 6 months prior to the month row context.

Trying to get the values in the second column to only include aging accounts 6 months prior instead of 12 months prior.

Any ideas would be much appreciated.

Trailing6Month Conversion:=CALCULATE([TOTAL LTD Converted Amount] ,Filter(Settlement700,Settlement700[OpenDatePool]>=RELATED(DimDate[Trailing6MonthsEnd])))

Trailing6Month LTD Conversion Amount:=CALCULATE([Trailing6Month Conversion],DATESINPERIOD(DimDate[FullDate],LASTDATE(DimDate[FullDate]),-6,Month))

Thanks!

Ben Lezin


Dynamic Slicers without two way relationships?

$
0
0

So, after my last post where the issue came down to my model, I have redone my data sources as a v.2 model and split out into traditional dim/fact tables. I have 2 fact tables a few dims that are shared between the two facts and some dims that are only on one fact.

In my old model I was doing most of this de-normalisation in my sql queries to produce the fact tables (and the two fact tables were related together).

In v1 I used to get a much better context-aware set of slicers as they were directly connected to the fact that the visualisations on the page were relating to. As I selected a slicer, any other slicers items that were no longer possible would disappear. This is no longer happening with this star-schema method. The old way was better from a user perspective.

I had to remove some "both" cross filter directions from the relationship model due on the dims that were shared between both facts, so they are only now Single. I wonder if that has any bearing on this but even if it does, I don't see a solution from this angle.

I guess the only idea I have would be to create calculated measures/columns (probably columns) to materialise the interesting dim values into the fact table but this seems a bit of a time consuming process and as I don't necessarily know in advance which slicers the users may want to use, so it feels like I almost need to add all possible dimension attributes in each fact table... ?

It all feels quite wrong.. so I am back here for advice from those who know how to do it right!

Here is my relationship diagram. Sorry as this is in PowerBI it isn't really easy for me to make the whole model available, but hopefully this is a simple enough theory question..

In my testing the slicer updates work ok if they are on a 2 way relationship but not on a Single way relationship.

In my case my 2 fact tables are really related (SchemeParticipantResult is a parent of ParticipantMeasureResult) but this then breaks the traditional Star schema that I was advised to follow before.

Massive thanks for any thoughts.

PowerPivot - COM exception while opening...even though I was closing

$
0
0

I am running Office 365 ProPlus 16.0.6001.1038 (64 bit) on Win 10 Pro (64 bit).  I recently upgraded from Office 365 ProPlus 2013 (32 bit) in order to handle larger data sets in PowerPivot data models.

After upgrading several of my files and data models, I was able to open the data models in PowerPivot, refresh data and manipulate my pivot tables and charts.  However, when I would click to save or exit  the file without saving I would get the following message:

Sorry, PowerPivot can't open the Data Model because there was a COM exception while opening a workbook on a corrupt installation of Excel.  Click Details for more information.

Details:  

============================
Error Message:
============================
Object reference not set to an instance of an object.
============================
Call Stack:
============================
   at Microsoft.AnalysisServices.BackEnd.DataModelingSandbox.HandleRegionalSettingsChange()
   at Microsoft.Office.PowerPivot.ExcelAddIn.InProcServer.LoadSandboxAfterConnection(String errorCache)
   at Microsoft.Office.PowerPivot.ExcelAddIn.InProcServer.LoadSafeSandboxAfterConnection(String errorCache)
   at Microsoft.Office.PowerPivot.ExcelAddIn.InProcServer.LoadOLEDBConnection(Boolean raiseCompleteEvent, String errorCache)
============================

I have tried the Quick Repair, Full Repair, Uninstall & Reinstall but still get the same results.  Once the issue does happen, if I do not close the file and go into PowerPivot, all of my data models are gone and PP is blank.  Unfortunately I did not realize this the first couple of times and saved my files only to find the data models gone on reopening and only static pivot tables/charts remaining.  My backup files are currently worthless because I can't save them after refreshing without the data models being erased.

I thought it might be related to older files that I upgraded the data models.  However, I created brand new files with new data models only to have the same issue occur.  

Please advise as I need to refresh my models and populate dashboards!

Thanks,

RL

How to create an incrementing sub counter for "sort by column" purposes

$
0
0

Ok, so something I could easily solve in Sql server in my case but interesting that this seemed to be tricky

I have a table ComponentPeriod. In it we have the combination of a component (e.g. A,B,C ) and a period (2014 Q1, 2014 Q2, 2014 January etc)

I want the periods to be in descending order (2015 Q4, 2015 Dec, 2015 Nov, 2015 Oct, 2015 Q3 ... etc) and so I need to create a sequential number series to allow this to happen (as we can only order in the client tools by a single column - and so I guess the technique I'm looking for is used a lot to produce these types of "order by" columns)

I have done this in the past using

Period_Sequence =
calculate
(	countrows(Period)
,	filter
	(	Period
	,	   Period[Start_Date] <= earlier(Period[Start_Date])&& Period[Duration_String] = earlier(Period[Duration_String])
	)
)


Which was fine when I was referring to a table where Periods where distinct directly but now I

have denormalised this for ComponentPeriod so I need something a little more sophisticated

Whats the best way to get a sequence with perhaps some partitions in across a subset of distinct columns (I guess from SUMMARIZE or similar)

.g. I want

Period_Name, Type, Sequence

2015 Q4, Quarter, 1

2015 Dec, Month, 2

2015 Nov, Month, 3

2015 Oct, Month, 4

2015 Q3, Quarter, 5

2015 Sep, Month, 6

etc

even though there may be multiple records in ComponentPeriod that have the period 2015 Q4, but I want them all to have the value Sequence value of 1?

I've got as far as:

Period_Sequence Desc =
calculate
(	countrows(summarize(ComponentPeriod, ComponentPeriod[Period_End_Date]))
,	filter
	(      ComponentPeriod
	,	   ComponentPeriod[Period_End_Date] >= earlier(ComponentPeriod[Period_End_Date])
	)
)

But this doesn't distinguish between the different types.

I need an equivalent of the t-sql -

row_number() over (order by Period_End_Date desc, case when 'P3M' then 1 when 'P1M' then 2 end asc

Thanks for any tips!

Switching from power query to power pivot without loss of pivot tables associated with model

$
0
0

Hi,

We have a build a report using power query in excel 2013. Due to the popups(Privacy levels, query run confirmation) which power query shows when user opens the report for the first time, we are planning to move the pivot table report from power query to power pivot.

Is there an easy way to migrate with out rebuilding the power pivot model ( tabs, relationships & calculations).

Thanks,

Dileep



Thanks Dileep

How to get order first date for a specific product & custumer

$
0
0

Hi I have a table with all my orders lines, I need to identify for a specific customer which is the first order of a specific article (first date filtered for customer and article) and use this information to tag the order line for that article for the specific customer as "Newly Ordered article" if the order date = first order date or as "Reordered article" if the date on the specific order line is subsequent to the first order date.

I immagine I need to combine a Lookup date filtered for customer and article and use it with a IF formula.

Can anyone help?

Similar to this I would also like to define that if the first order for a product for the specific custumer is older then a certain date, then this would be defined as and historical customer for the specific article, if the first order on the article is more recent the a specific date, then this will be defined as "new customer for that article".

Thanks to any expert that can give me an hand!

 

 

How to get order first date for a specific product & custumer

$
0
0

Hi I have a table with all my orders lines, I need to identify (DAX formula) for a specific customer which is the first order of a specific article (first date filtered for customer and article) and use this information to tag the order line for that article for the specific customer as "Newly Ordered article" if the order date = first order date or as "Reordered article" if the date on the specific order line is subsequent to the first order date.

I immagine I need to combine a Lookup date filtered for customer and article and use it with a IF formula.

Can anyone help?

Similar to this I would also like to define that if the first order for a product for the specific custumer is older then a certain date, then this would be defined as and historical customer for the specific article, if the first order on the article is more recent the a specific date, then this will be defined as "new customer for that article".

Thanks to any expert that can give me an hand!

 

 

First Sales Date by Customer for Specific Product Only

$
0
0

I have a sales order table that has customer, sales, product and sales date.  I am looking to return the first sales date by customer for a specific product.

SalesTable:


CustomerProductSales DateSalesFirst Bike Date
JonBike12/4/2011 $10.00
JonTruck1/1/2010 $2.00
JonBasketball11/4/2010 $15.00
JonBike1/23/2012 $10.00
PeterBike5/4/2011 $10.00
PeterTruck11/5/2012 $12.00
PeterBasketball10/4/2011 $15.00
PeterBike6/1/2012 $10.00
SallyBike3/1/2011 $10.00
SallyTruck4/2/2012 $12.00
SallyBasketball6/6/2010 $15.00
SallyTies11/5/2010 $ 8.00
SallyFootball3/6/2011 $9.00

I would like to return the date of the first bike purchase date by each customer and repeat that date for each row and customer.  Can I use function to complete?  I have a datedim table as well related to the sales date.

Thank you for any help you could provide.

Kevin


"What-if"-analysis with several pivot tables and SSAS

$
0
0

For "what-if"-analysis, I am using the writeback feature of Excel (Version 15) in order to write back data into Analysis Services (SQLServer 2014). Before I want to publish the changes to SSAS, I would like to see the effects of my changes, that is, the data should be recalculated.

I've got the following problem: On my Excel sheet, there are three pivot tables that are connected to SSAS. Whenever I change a value in one table, the changes should also be reflected in the other tables. To achieve this, I have to publish the changes to SSAS, i.e. all changes in SSAS must be committed first. Otherwise, changes are only visible in the Pivot table that I have changed)

Is it possible that changes can be made visible in all Pivot tables (without publishing the data first)? According to my understanding, this should be possible if all three Pivot tables are using the same connection to SSAS so that they "see" uncommitted data. Is there a way to do this?

Thanks a lot

Chris

Downloading SQL Table with PowerPivot for Excel 2010

$
0
0

Hi ,We have just implement Microsoft Dynamics NAV. and I'm trying to learn how to use this Excellent tool powerpivot add on, But when I'm trying to connect it to any SQL table that support Dynamics NAV I have an error message while downloading the table :

"do not have enough memory or I should use Excel 64 bits instead 32 bits"

when I check CPU memory Utilization we are just using less tha 20%.

So I don't know what is the solution and if any one had this problem before, what is the solution.

Thanks in advance

FYI : I'm working on a remote server and the using Excel 2010.

"PowerPivot is unable to load the Data Model" in Excel 2016 and Windows 10

$
0
0
You cannot vote on your own post                    
0
            

I have an Excel workbook with sheets with PivotTables using PowerPivot to fill them. The source are SQL Server views and a stored procedure. Somehow I receive now an error message:

- An issue with the Data Model is preventing Microsoft Excel from opening this workbook. Try restarting Microsoft Excel.

followed by

- PowerPivot is unable to load the Data Model

I have Windows 10 and Office 2016. The first message I can't find on the internet. On the second one I found several tips (repair Office, reboot, etc), but nothing helps. Also on a colleagues computer this problem occurs (so it is in the workbook itself). An old version from 2 weeks ago, still works.

Any idea? Any suggestion?

Thanks in advance,

Regards Gerben

Note: this question is also on: https://social.technet.microsoft.com/Forums/office/en-US/fb6bb39b-3c45-4704-86cc-79b183dade73/powerpivot-is-unable-to-load-the-data-model?forum=excel

Update: also happens when only 1 Excel file is open; analysis and other SQL Server services are stopped, etc.

AverageX with summarize

$
0
0

Following on from other posts I am now using my most granular fact table to provide all the measures that I need to analyse. I have the following data simplified) for just one participant.

SchemeParticipant_Id, ComponentPeriod_Id, ParticipantMeasure_Id, ComponentType_Id, weighted_Rank

1,1,1,1,0.5

1,1,2,1,0.25

1,2,3,1,1

1,2,4,1,1

1,2,5,1,1

1,2,6,1,1

Each ComponentPeriod represents a month inside a Quarter (the SchemeParticipant). So when showing columns SchemeParticipant_Id, ComponentType_Id and my calculated measure avg_Achievement_weighted_Rank I expect to get the value (0.75+1+1)/3 = 0.916 but I am getting the value 0.88 with the following formula that I have on the ParticipantMeasure table

avg_Achievement_weighted_Rank =
AVERAGEX
(   SUMMARIZE
	(	summarize
		(   ParticipantMeasure
		,	ParticipantMeasure[SchemeParticipant_Id]
		,	ParticipantMeasure[ComponentParticipant_Id]
		,	ParticipantMeasure[ComponentType_Id]
		,	"sum_Achievment_weighted_Rank",sum(ParticipantMeasure[weighted_Rank])
		)
	,	[SchemeParticipant_Id]
	,   [ComponentType_Id]
	,   [sum_Achievment_weighted_Rank]
	)
,	[sum_Achievment_weighted_Rank]
)
What am I doing wrong?


Why Unexpected error from the controller of the external database (1).

$
0
0
They could not retrieve data 'DATA NAME'. Reason: Unexpected error from the controller of the external database (1).

Define SSAS Tabular measures in batch?

$
0
0
We have an Excel PowerPivot model that we are trying to move to SSAS Tabular. The model is complex and has over 300 measures. To help group these in Excel, we pasted in dummy tables and defined the measures in logical groupings. Now when we are migrating to SSAS, we have to delete the pasted tables --that have ALL of the measures, in order for the import to work successfully. Any suggestions on how to migrate the model? We have a nice report of all of the measures from DAX Studio, but I am not looking forward to manually re-entering 300 measures through the user interface. Any ideas on how to do this easier? Is there any way to define measures in batch? Or is there a way to change the pasted table to a file so the import will work? Will the import work in SSAS 2016?

Powerpivot - Sum of the Parts not Equaling Grand Total

$
0
0

I've created a measure counting instances of unique identifiers utilizing the following formula. However, the Grand Total does not equal the sum of the sub-totals. 

=CALCULATE(COUNTROWS(DISTINCT('Rawdata File'[Identifier])),ALL('Rawdata File'[Identifier]))



IF in Power Query statement struggling with converting text to numbers

$
0
0

Hi I'm a PQ newbie and struggling to understand a slow loading issue with an if statement.

In the raw data the field [Location] is a text field e.g. 0010. I have a parameterised query that get a Location_Value from Excel and passes it to the PQ query using

#"Filtered Rows1" = Table.SelectRows(#"Removed Other Columns", each ([SalesMode] = 0) and ([SalesType] = 0) and ([Location] = Location_Value))

This works fine if you chose a single location.  However I wanted to be able to select all locations and text is horrible to work with so in PQ I used the change type function to change the location column into whole numbers. I changed excel to also pass a number as Location_Value.   I was therefore surprised when the same query took 2.5 times longer to refresh????

My PQ now looks like this

  #"Changed Type" = Table.TransformColumnTypes(#"Removed Other Columns",{{"Location", Int64.Type}}),
    #"Filtered Rows1" = Table.SelectRows(#"Changed Type", each ([SalesMode] = 0) and ([SalesType] = 0) and ([Location] = Location_Value))

i'm wondering if I need to do something to the ([Location] = Location_Value) bit as maybe it still thinks [Loation] is text and it is trying to compare it to a number. I st assumed the step above meant that [Location] was now a number, but maybe you still have wrap it with some kind of VALUES or TEXT function?

Thanks for any advice

mike

What happens to my database credentials? I set up service account, but others who use are asked to log in and service account Login is missing

$
0
0

I set up Power Query to use a service account. When I run power queries that I have defined, the source uses the Service Account. When I save the workbook to a Share, and another opens the Service account credentials are missing and the user is ask to supply their credentials. How can I make it so others use the service account?

I set this in Power Query in Option and Databas Options, Data Source settings, credentials 

SummarizeColumns can not have outside filter context

$
0
0

Trying to create a new measure and thought the new SummarizeColumns function may do what I want. But in trying it I get

MdxScript(Model) (4, 4) Calculation error in measure 'ParticipantMeasure'[avg_of_Achievement_weighted_Rank]: SummarizeColumns can not have outside filter context.

I'm still pretty new to DAX so my question is how could I know that this function cannot have an outside filter context? It doesn't seem to mention this explicitly in the docshttps://msdn.microsoft.com/en-us/library/mt163696.aspx and I wonder if I'm missing some superset thread of knowledge or rule that would have told me that this was the case.

Further I assume that this means that I cannot use this function inside a measure at all (I guess I can use it in a CalculatedColumn as that only has row context or in an evaluate statement inside dax studio?).

Thanks for any insights!

How to create a Subtotal column

$
0
0
  Q1-2013 Q2-2013 Q3-2013 Q4-2013 2013 Total
  Distinct   Count Member Distinct   Count Member Distinct   Count Member Distinct   Count Member Member   Months
AMBULANCE - LAND 264 301 355 352 1272
AMBULATORY SURGICAL CENTER 16 38 30 34 118
COMMUNITY MENTAL HEALTH CENTER 6 7 11 13 37
I have the above data, and want to create a column adding up the   Distinct count member of each quarter.   The number of distinct count member of each quarter is from a measure.   The result I want to create is the column of 2013 Total Member Months as   shown above. Please help me for create   a dax fomula.  Thank you.

lock down formula in PowerPivot ?

$
0
0

Hi All,

 Is it possible to lock down formula in PowerPivot ?

Thanks in advance.

Viewing all 4715 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>