Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

SQL Server AlwaysEncrypted not working in Power BI

We've implemented Always Encrypted in our SQL Server 2016 database. Using Always Encrypted we encrypt a column X.

Using a .NET DirectQuery connection we decrypt the data in SSAS (a tabular model). The decryption works. Next step, we use a live connection from PowerBI to the Tabular model. The data is shown decrypted in PowerBI, so that works.  However: we cannot filter on a column with encryption enabled. If we filter (in a filter of a visual) column X in PowerBI we receive an error. This error occurs in both ways of database encryption (Deterministic and Randomized).

 

If we change the SSAS tabular .NET connnection from DirectQuery to Import the filtering works in PowerBI. This is not our ideal solution because we only want to store the data in the database, and not in the SSAS tabular model and/or in PowerBI.

 

This is the model:

encryption_model.png

 

These are the errors that occur:

 Deterministic encryption - errorDeterministic encryption - errorRandomized encryption - errorRandomized encryption - error

 

Does anyone have a solution for this problem or an explanation why this does not work?

 

 

4 REPLIES 4
Anonymous
Not applicable

We've implemented Always Encrypted in our SQL Server 2016 database. Using Always Encrypted we encrypt column X.

Using a .NET DirectQuery connection we decrypt the data in SSAS (a tabular model). The decryption works. Next step, we use a live connection from PowerBI to the SSAS tabular model. The data is shown decrypted in PowerBI, so that works.  However: we cannot filter on a column with encryption enabled. If we filter (in a filter of a visual) column X in PowerBI Desktop we receive an error. This error occurs in both ways of database encryption (Deterministic and Randomized).

 

If we change the SSAS tabular .NET connnection from [DirectQuery] to [Import] the filtering works in PowerBI. However, this is not our ideal solution because we only want to store the data - encrypted - in the database, and not - decrypted - in the SSAS tabular model and/or in PowerBI.

 

This is the model:

encryption_model.png

 

These are the errors that occur: 

Randomized encryption - errorRandomized encryption - error 

Does anyone have a solution for this problem or an explanation (based on documentation) why  this does not work?

 

 Deterministic encryption - errorDeterministic encryption - error

v-jiascu-msft
Microsoft Employee
Microsoft Employee

Hi @Anonymous,

 

Please refer to use-always-encrypted-data-with-ssas-and-power-bi/sql-server-2016-always-encription-features and with-always-encrypted.

 

Best Regards,

Dale

 

Community Support Team _ Dale
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

Hi Dale, 

 

Thanks for your comment. I've added the links as background info. Unfortunately, those articles do not provide the solution. 

Anonymous
Not applicable

Hi, 

 

unfortunately links seems to be unrelated as usual, have you guys find a solution yet? 

 

We are aiming for a PaaS solution but I can not seem to be finding a solution. I have been thinking about Power Query M data connector with ODBC driver but it will take time and I am trying to avoid it. Please let us know if you find out anything useful. 

 

Thanks!

 

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.