Comments for Kasper de Jonge PowerPivot Blog » Kasper de Jonge PowerPivot Blog http://www.powerpivotblog.nl Bringing BI to the masses Mon, 27 Oct 2014 02:32:29 +0000 hourly 1 http://wordpress.org/?v=4.0 Comment on Alternating backgroundcolor in tablix for rows of a group by Ryan http://www.powerpivotblog.nl/alternating-backgroundcolor-in-tablix-for-rows-of-a-group/#comment-204111 Mon, 27 Oct 2014 02:32:29 +0000 http://business-intelligence.kdejonge.net/?p=527#comment-204111 Nice. Thanks!

]]>
Comment on Ask your questions here by Thomas http://www.powerpivotblog.nl/ask-you-questions-here/#comment-203601 Sat, 25 Oct 2014 01:17:11 +0000 http://business-inteligence.kdejonge.net/?page_id=2#comment-203601 Mike,

The following is my current query for relationships:

select distinct Database_Name, Object_Type, [Table], Object, Expression, Referenced_Object_Type, Referenced_Table,
Referenced_Object, Referenced_Expression, Query from $system.DISCOVER_CALC_DEPENDENCY
where (Object_Type = ‘ACTIVE_RELATIONSHIP’ or Object_Type = ‘RELATIONSHIP’)
order by [Object]

The results for individual relationships are given in parts over multiple rows, but could be pieced together. I looked at all of the other DMVs but could not find any that had better information on relationships.

Aside: Mike, have you checked out Kasper’s book “Dashboarding and Reporting in Power Pivot and Excel”? I found it filled with jaw-dropping insights into both Power Pivot and Power View. The Kindle version is only $9.99 (USD) and the Kindle Reader for PC was a free download (and hopefully still is). If you would be interested in comparing notes, that would be great!

– Thomas

]]>
Comment on Ask your questions here by Thomas http://www.powerpivotblog.nl/ask-you-questions-here/#comment-203581 Fri, 24 Oct 2014 23:49:54 +0000 http://business-inteligence.kdejonge.net/?page_id=2#comment-203581 Chris,

Great comment on the single quotes!

Your comment will help other users as they try out the queries.

Thomas

]]>
Comment on Powerpivot CTP3: What is new for Time Intelligence functions by Michael K http://www.powerpivotblog.nl/powerpivot-ctp3-what-is-new-for-time-intelligence-functions/#comment-203531 Fri, 24 Oct 2014 21:01:21 +0000 http://www.powerpivotblog.nl/?p=2258#comment-203531 When marking as a date table, is there a way to set the year end date to 06-30? Thank you.

]]>
Comment on Ask your questions here by Chris Gilbert http://www.powerpivotblog.nl/ask-you-questions-here/#comment-203521 Fri, 24 Oct 2014 20:39:16 +0000 http://business-inteligence.kdejonge.net/?page_id=2#comment-203521 For the “try this for Calc Columns” and “try this for Measures” additional queries at the bottom…
I needed to replace/overwrite the single quotes in the queries around ‘Calc_Column’/’Column’ and ‘Measure’/’Column’. I couldn’t just cut-and-paste.

Somehow, the font makes a difference inside of DAXStudio under 2013.

]]>
Comment on Ask your questions here by Mike Rudzinski http://www.powerpivotblog.nl/ask-you-questions-here/#comment-203482 Fri, 24 Oct 2014 18:21:09 +0000 http://business-inteligence.kdejonge.net/?page_id=2#comment-203482 DISCOVER_CALC_DEPENDENCY is an awesome table! It tells you all the measures you need to fix if you rename something. If you want to collaborate on something here, you can find me through LinkedIn. I’m the only Rudzinski at Cat.

]]>
Comment on Ask your questions here by Thomas http://www.powerpivotblog.nl/ask-you-questions-here/#comment-203481 Fri, 24 Oct 2014 18:11:48 +0000 http://business-inteligence.kdejonge.net/?page_id=2#comment-203481 Sounds possible.

Have you tried two pivot tables, both connected to one slicer (where you select 10 or however many companies you want)?

Thomas

]]>
Comment on Ask your questions here by Thomas http://www.powerpivotblog.nl/ask-you-questions-here/#comment-203462 Fri, 24 Oct 2014 18:07:33 +0000 http://business-inteligence.kdejonge.net/?page_id=2#comment-203462 Paul, Happy for your success documenting your models using DAX Studio. Here are a couple more queries to try in DAX Studio:

For calculated columns try this:

select distinct Database_Name, Object_Type, [Table], Object, Expression, Referenced_Object_Type, Referenced_Table,
Referenced_Object, Referenced_Expression, Query from $system.DISCOVER_CALC_DEPENDENCY
where (Object_Type = ‘Calc_Column’)
and [Referenced_Table] = [Table]
and [Referenced_Object_Type] = ‘Column’
order by [Object]

For measures try this:

select distinct Database_Name, Object_Type, [Table], Object, Expression, Referenced_Object_Type, Referenced_Table,
Referenced_Object, Referenced_Expression, Query from $system.DISCOVER_CALC_DEPENDENCY
where (Object_Type = ‘Measure’)
and [Referenced_Table] = [Table]
and [Referenced_Object_Type] = ‘Column’
order by [Object]

If you are interested, I have started a query to obtain relationships, but have not quite nailed it down to how I want the results.

Let me know what you think.

Thomas

]]>
Comment on Ask your questions here by Derek http://www.powerpivotblog.nl/ask-you-questions-here/#comment-203311 Thu, 23 Oct 2014 20:47:35 +0000 http://business-inteligence.kdejonge.net/?page_id=2#comment-203311 Question: Why am I not able to create a running total on a running total using this methodology ->

Running Total:=CALCULATE(
[Simple Order Amt],
FILTER(ALL(‘Date’),
SUMX(
FILTER(‘Date’,
EARLIER(‘Date’[Year]) = ‘Date’[Year] &&
EARLIER(‘Date’[MonthOfYear]) <= 'Date'[MonthOfYear] ) ,1)))

Running Total of Running Total:=CALCULATE(
[Running Total],
FILTER(ALL('Date'),
SUMX(
FILTER('Date',
EARLIER('Date'[Year]) = 'Date'[Year] &&
EARLIER('Date'[MonthOfYear]) <= 'Date'[MonthOfYear] ) ,1)))

I am staying away from date specific functions because most of my data is running totals on non-dates.
If I change the second measure to this

Running Total of Running Total:=CALCULATE(
[Running Total],
FILTER(ALL('Date'),
SUMX(
FILTER('Date',
EARLIER('Date'[Year]) = 'Date'[Year] &&
EARLIER('Date'[MonthOfYear]) = 'Date'[MonthOfYear] ) ,1)))
(notice the greater than & equal to now only becomes an equal to) it returns data (not a running total but data as you would expect). However the first one posted shows blanks. Why does the operator make any difference?
Any thoughts on this? How would this be achieved?

P.s. I know this seems like a ridiculous thing to attempt but it has a purpose in my situation.

]]>
Comment on Ask your questions here by Scott http://www.powerpivotblog.nl/ask-you-questions-here/#comment-203301 Thu, 23 Oct 2014 19:32:54 +0000 http://business-inteligence.kdejonge.net/?page_id=2#comment-203301 Hi,

I currently have a Values fact table that has an As Of Date and Effective Date. The Fact table is joined to a Location Dimension table using surrogate key. Both the Fact and Dimension tables have a durable key for the dimension record. Both tables also join to Date Dimension.

A new record will be inserted into fact when there is a new dimension record or when a value changes.

What I would like to do in PowerPivot is be able to pass a date for both the As of Date and Effective Date fields and return only a single row from the fact that represents the maximum of both dates for a given location.

lets say 2 fact records exist for Dimension A with AsOfDates of 1-1-2014 and 4-1-2014 respectively and EffectiveDates of 1-1-2014 and 4-1-2014 respectively and I filter using AsOfDate = 4-16-2014 and EffectiveDate = 4-16-2014, i only want the latest row since it is more current.

looking for possible way of doing this using DAX if exists.

thanks
Scott

]]>