Context Transition in SUMX Function

Posted on

Yesterday I have read an article “Currency conversion in DAX for Power BI and SSAS” from Kasper de Jonge. He used a very neat technique for that.

But I think there might be some confusions from some people, why this technique works, especially how the context flow down to the lookup table.


There are only 2 measures:

  1. TrnExchangeRate = Min(FactExchangeRate[Factor])
  2. TotalSales = if(HASONEVALUE(ReportCurrency[ReportCurrency]),

SumX( FactSales, [Sales] * [TrnExchangeRate]))

The pivot table:


Some people might ask, for this measure “SumX( FactSales, [Sales] * [TrnExchangeRate])”, why iterating FactSales table can filter down to the “1-side” lookup table TransactionCurrency and ExchangeDate?

The trick here is, [TrnExchangeRate] is a measure. When it is used in another measure, it will be automatically wrapped with CALCULATE, which will perform the context transition from row context to filter context. Important is, the Fact table “FactSales” in SUMX is expanded and includes all its 1-side lookup tables. So when context transition happens, the filter context will also affect the lookup tables.



Power BI Desktop/DAX – Using Unicode (Arrows) as Measures in a Table

Posted on

Source: Power BI Desktop/DAX – Using Unicode (Arrows) as Measures in a Table

Power BI Visual Embedded in SSRSPreview

Posted on

in PASS , Microsoft announced that “Technical Preview of Power BI reports in SQL Server Reporting Services now available” (https://blogs.msdn.microsoft.com/sqlrsteamblog/2016/10/27/technical-preview-of-power-bi-reports-in-sql-server-reporting-services-now-available).

Anyway we can only taste it by using Azure Marketplace. Now I have the VM ready (when building this VM, make sure using default size, be careful this is costly! so after testing, stop it.).

First impression: fantastic! Now we can really control the PBI version:).

Some screenshots

loading speed was pretty quick.

next step, I will get the VHD from Azure and load into my test machine to reduce cost.

Really excited to see this feature, or to see, a milestone for SSRS.


Probability to get a lucky draw?

Posted on Updated on

Yesterday we had annual dinner with all colleague. Of course, lucky draw must be carried out.

All of our names were written in a piece of small paper for each and thrown into a box. The lucky draw was performed about 30 rounds. Each time a paper was pulled out, the person with the name same as the one from that paper would get a gift. After that that paper was discarded (without replacement).

Everyone was excited. All hoped to get drawn out. Suddenly I was thinking, what is the chance for me to get a gift?

Yeah, I don’t need a precise number but just a rough one. So I took this formula from Excel:

BINOM.DIST.RANGE(30,1/500,1) = 5.66%

Ah ja, of course not so accurate – no consideration of “no replacement”, and some minor one. But sure enough, it should be between BINOM.DIST.RANGE(30,1/450,1) and BINOM.DIST.RANGE(30,1/500,1). That’s 5.66% – 6.25%. Not too bad:)

And, I got one. Bingo! Lucky enough!

Power BI Desktop October update

Posted on Updated on

Microsoft Power BI team is really amazing! This month they brought up 23 new features. Among them, I ticked the best features (I thought):

PowerBI Oct

More details:


Windows 10 Upgrade: What This Means for Your Endpoint Security

Posted on Updated on

On July 29th, Microsoft will be releasing their next major operating system, Windows 10. Unlike previous OS upgrades, this version does not require users to purchase the new OS. The existing Windows 7 and 8 end users might initiate an upgrade directly on their computers, making it more difficult for IT admins to enforce version control.

At Symantec, we are committed to ensuring our customers: Symantec Endpoint Protection 12.1, Symantec Endpoint Protection Small Business Edition (hosted version) and Symantec Endpoint Protection Small Business Edition (on-prem), remain fully protected across all operating systems.

For Symantec Endpoint Protection 12.1, a maintenance patch release will be available on July 29, 2015. Customers will need to be current on maintenance to receive the maintenance patch update. For more information, visit our SEP 12.1 Windows 10 Knowledge Base.

Customers using Symantec Endpoint Protection Small Business Edition (hosted version) will experience an automatic system update on computers via Live Update targeted for July 29th. From July 29th onwards, any new endpoint installs of the hosted version of Symantec Endpoint Protection Small Business Edition will automatically have their machines protected should they wish to upgrade to Windows 10. Similarly, from July 29th onwards, any existing Symantec Endpoint Protection Small Business Edition customers will receive targeted patch updates to protect their machines on the new Windows 10 platform. These patch updates will automatically be rolled out later via Live Update to all endpoints, whether they are moving to Windows 10 now or at some point in the future.  This effectively allows IT  Administrators to proactively protect endpoints that move to Windows 10 at a later date. Existing customers must be on a current subscription to take advantage of these patch updates. Symantec Endpoint Protection Small Business Edition will automatically notify IT Administrators if any users decide to upgrade to Windows 10 without informing IT. In these instances, a new patch for Windows 10 will be pushed out to protect these user’s machines within a 1-2 hour window.  Symantec will also provide guidance for IT Administrators who wish to avoid this 1-2 hour window and push out the patch update immediately – this guidance can be found on Symantec Knowledge Base.

For customers currently running Symantec Endpoint Protection Small Business Edition 12.1 (on-prem), which has now reached End-of-Life and will not support Windows 10, you will need to migrate to the hosted edition in order to receive protection for Windows 10 systems.  Endpoint Protection Small Business Edition (on-prem) customers can migrate to the hosted edition.  For information on our automated migration process, visit: go.symantec.com/sbemigration

What’s new in System Center Configuration Manager Technical Preview 2

Posted on Updated on

by Brian Huneycutt [MSFT]

9 Jul 2015 9:00 AM

Today, we are making available System Center Configuration Manager and System Center Endpoint Protection Technical Preview 2. This second technical preview provides you with an early glimpse of the functionality that we plan to release in Q4 of this calendar year, bringing with it full support for client deployment, upgrade, and management of Windows 10.

New features available in Technical Preview 2 include:

  • Universal Windows apps support for Windows 10 – You can now side-load internally developed Universal Windows apps to Windows 10 devices.
  • Peer cache support for Windows PE – Peer cache support now includes OS deployment scenarios for Windows PE, extending our existing Configuration Manager peer cache content management.
  • Ability to manage Windows 10 PCs and mobile devices via MDM with on-premises Configuration Manager infrastructure – Support now includes Windows 10 PCs in addition to existing support for mobile devices which was added in the first Technical Preview. With this new option, you can manage Windows 10 devices using Configuration Manager integrated with Microsoft Intune (hybrid) without the need to store your data in the cloud. This is especially helpful for managing devices that are unable to connect to the Internet such as Windows IoT/Embedded devices. Note: An Intune subscription is required.

Also included in this technical preview are features that were previously released in the first Technical Preview in May:

  • Support for Windows 10 upgrade with OS deployment task sequence – In addition to providing support for existing wipe-and-load (refresh) scenarios, the Configuration Manager Technical Preview includes enhanced upgrade support with in-place upgrade to Windows 10.
  • Support for installing Configuration Manager on Azure Virtual Machines – Similar to how you can install Configuration Manager on Hyper-V today, you can now run Configuration Manager in Azure VMs. This provides flexibility to move some or all of your datacenter server workloads to the cloud with Azure.

So what’s the next step? Try out System Center Configuration Manager Technical Preview 2, and tell us what you think. Also, if you have a feature request, make sure to share your ideas with us on our new Configuration Manager UserVoice site.

We hope you enjoy this second Technical Preview!


The System Center Configuration Manager Team