Translate encrypt SAS function to Power BI - sas

I am doing this function in SAS (not created by me) to encrypt an id.
Is it possible to replicate it in Power BI?
put(sha256(compress(put(input(client_id, 10.),10.))||
'3B9E336D986AFD0BD4E869869117B26DA9C2192A090878B6B9417C832DEDFAEE'
),$hex64.)
Thank you very much in advance.
Best regards

Related

Power BI analyse tabel in Excel export

I have a question about the function "Analyse in Excel" or "Analyse in Excel" in German when a PBI (Power BI) report has been published.
I read in a flat table in PBI and create some measures in PBI. Basically, it's about account numbers and the limits. A calculation is not necessary or possible here.
If I now want to analyse the data in Excel Pivot Table, I can only display the measures as values. An analysis of account numbers and limits is not possible, as limits are not measures.
What do I have to do to be able to select original data as values?
Thank you very much for your feedback and best regards
Andi
Try adding a measure from the table you are wanting to analyze and then double clicking on the measure value. This will pop open a new sheet and drillthrough to the rows detail behind that cell. It may give you the detail you are wanting. I also believe it will give you proper data types on columns so you can do Excel analysis.
Sorry! I do not get it.
To make it clear - I stripped down a very easy example of my problem:
I'm loading a flat file with account, currency, date and balance information.
The respective Power BI looks like:
After publishing the report into the cloud I would analyse the data within Excel
However, when I try to bring the "balance" information as value in, I'm receiving the following message:
The balance is not a measure in Power BI. Any idea what I can do?
Thank you and best regards
Andi

Get the filename of the excel file you are importing into power bi desktop

How do I get the filename of the excel file I am importing into power bi?
For example if I am importing C:/Path/abc.xlsx, how do I get "C:/Path/abc.xlsx" as a variable.
Excel had the method ActiveWorkbook.Name. What is that in power bi?
Thanks
I just saw a solution to that. Maybe this can help you

Can't place variables into values box in exported Excel dataset

I have a very large and dynamic Power BI dashboard that I have developed that my client user would really like to be able to gain access to in Excel. I have tried two ways to getting it connected:
1. In Excel >> Data/Get Data/From Power BI
2. In published Power BI Dashboard menu: Analyze in Excel
What it show in Excel looks wonderful if and only if I can place counts or sums into the values box. I keep getting this error and need help fixing: "The field that you are moving cannot be placed in that area of the report."
Please let me know what additional information that I can provide that would be useful. Any insight would greatly be appreciated!
I figured it out. I need to create measures in Power BI to place variables as values in Excel

How to make a text column in power bi dataset a numeric value

I am working on a report and updated the power bi dataset with the most recent data. However, for some reason a column is recognizing the data as a string instead of numeric. I checked the excel file it is updated from, but in the excel file the column is considered numeric. Any idea how to fix this, as i cant use the data as a string. In addition, it would be beneficial if there was a way to change the dataset to just using the excel file, instead of having to use power bi datasets, is there any way to do that as well, as when i try to change datasets in only lets me view power bi datasets.
Thank you!
In Power Query change the datatype to numeric.

What's the difference between DAX and Power Query (or M)?

I have been working on Power BI for a while now and I often get confused when I browse through help topics of it. They often refer to the functions and formulas being used as DAX functions or Power Query, but I am unable to tell the difference between these two. Please guide me.
M and DAX are two completely different languages.
M is used in Power Query (a.k.a. Get & Transform in Excel 2016) and the query tool for Power BI Desktop. Its functions and syntax are very different from Excel worksheet functions. M is a mashup query language used to query a multitude of data sources. It contains commands to transform data and can return the results of the query and transformations to either an Excel table or the Excel or Power BI data model.
More information about M can be found here and using your favourite search engine.
DAX stands for Data Analysis eXpressions. DAX is the formula language used in Power Pivot and Power BI Desktop. DAX uses functions to work on data that is stored in tables. Some DAX functions are identical to Excel worksheet functions, but DAX has many more functions to summarize, slice and dice complex data scenarios.
There are many tutorials and learning resources for DAX if you know how to use a search engine. Or start here.
In essence: First you use Power Query (M) to query data sources, clean and load data. Then you use DAX to analyze the data in Power Pivot. Finally, you build pivot tables (Excel) or data visualisations with Power BI.
M is the first step of the process, getting data into the model.
(In PowerBI,) when you right-click on a dataset and select Edit Query, you're working in M (also called Power Query). There's a tip about this in the title bar of the edit window that says Power Query Editor. (but you have to know that M and PowerQuery are essentially the same thing). Also (obviously?) when you click the get data button, this generates M code for you.
DAX is used in the report pane of PowerBI desktop, and predominantly used to aggregate (slice and dice) the data, add measures etc.
There is a lot of cross over between the two languages (eg you can add columns and merge tables in both) - Some discussion on when to choose which is here and here
Think of Power Query / M as the ETL language that will be used to format and store your physical tables in Power BI and/or Excel. Then think of DAX as the language you will use after data is queried from the source, which you will then use to calculate totals, perform analysis, and do other functions.
M (Power Query): Query-Time Transformations to shape the data while you are extracting it
DAX: In-Memory Transformations to analyze data after you've extracted it
One other thing worth mentioning re performance optimisation is that you should "prune" your datatset (remove rows / remove columns) as far "upstream" - of the data processing sequence - as possible; this means such operations are better done in Power Query than DAX; some further advice from MS here: https://learn.microsoft.com/en-us/power-bi/power-bi-reports-performance