m

How can I loop trough elements in columns in a powerbi function?

巧了我就是萌 提交于 2020-04-30 10:23:42
问题 I want to write a Function for cleaning numbers. While leaving them as text. So, in my queries I want to use e.g.: = CleanRN(PrevQueryTable, {"NumericTextColumn"}) The function is supposed to remove all non numeric characters and leading zeroes in not already numeric texts. (But the function is not the point for this question.) So in the queries themselves I can go with = Table.ReplaceValue(Benutzerdefiniert2,"_","",Replacer.ReplaceText,{"ONKZ/RufNr"}) or = Table.ReplaceValue(#"Ersetzter

Calculated columns as axis & value

爷,独闯天下 提交于 2020-03-05 02:06:48
问题 I have a bunch of calculated DAX columns that I want to show as a visual. If I use a normal bar chart I get the following image, Barchart 1, where because I do not have any fields in the axis field. The titles of each of the calculated columns are what I want the x-axis to be similar to how it is in the funnel chart below. The funnel chart only requires the value field to be filled in and it creates the following image which is kind of what I want but it needs to be vertical similar to the

Power BI change original table name which is displayed in Daxstudio

穿精又带淫゛_ 提交于 2020-03-04 18:15:10
问题 I noticed very odd thing that Daxstudio allows you to view original table name. It is a bit niuanse because when you rename table created in M then Daxstudio still refers to it using original table name, not the new name. Here is how to reproduce the bug. Power BI > Home > Enter Data Name the table RedTable . Run a query in Daxstudio: EVALUATE DISTINCT('RedTable'[Column1]) Now rename the table to BlueTable : And run the query in Daxstudio for a new table name: You can still see the original

ASP.NET session variables

人盡茶涼 提交于 2020-01-31 20:03:46
问题 I have a session variable: ID. Is there ever a possibility that two browsers on the same PC could share the same session variable and update it, therefore producing random results. I would expect there to always be two separate sessions with two separate sets of session variables. I have researched this and I have come accross the following web page, which suggests that there are session locks to prevent this from happening:http://odetocode.com/blogs/scott/archive/2006/05/20/session-state

PowerQuery COUNTIF Previous Dates

冷暖自知 提交于 2020-01-25 11:27:25
问题 I'm a little rusty on PowerQuery. I need to count "previous" entries in the same table. For example, let's say we have a table of car sales. For the purposes of PowerQuery, this table will be named tblCarSales I need to add two aggregate columns. The first aggregate column is the count of previous sales. The Excel formula would be =COUNTIF([Sale Date],"<"&[@[Sale Date]]) The second aggregate column is the count of previous sales by make . The Excel formula would be =COUNTIFS([Sale Date],"<"&[

Reading the first n rows of a csv without parsing the whole file in Power Query

∥☆過路亽.° 提交于 2020-01-25 08:55:07
问题 I have these csv data files with my relevant data in the first five rows and a bunch of mal formmatted data below it. When I use filter rows it still reads in all of the data below which causes problems for me. This is problematic because I am reading in a whole folder's worth and some of these files have a different number of columns below the rows I'm interested in. Those columns or data below those first five rows I do not need, but power query throws errors when it is looking for the same

Power Query to Filter a SQL view based on an Excel column list

点点圈 提交于 2020-01-23 03:45:47
问题 Is there a way to filter a SQL view based on a list of values in an excel table column using Power Query? I have a SQL view that returns a large set of data (millions of records or properties). Users want to filter that based on an excel table column of property IDs. I know I can just do a merge join based on the property ID between the view and the excel column in power query. But it looks like the merge brings in the millions of records first then filtered it in the join. Which takes a long

Power query M the IN operator

流过昼夜 提交于 2020-01-15 09:41:30
问题 What would be equivalent of SQL IN operator for Power BI. Just like in clause: where [Column1] IN ('Value1', 'Value2', 'Value3') I am looking for M solution (not DAX). 回答1: You can use the List.Contains function. For example, = Table.SelectRows(Table1, each List.Contains({'Value1', 'Value2', 'Value3'}, [Column1])) will filter Table1 to include only rows where [Column1] is contained in the given list. 来源: https://stackoverflow.com/questions/51740679/power-query-m-the-in-operator

How do I comment in Power Query M?

谁说我不能喝 提交于 2020-01-12 11:57:18
问题 Is there a way to comment M code / comment out lines or blocks of code? 回答1: M supports two different types of comments: Single line comments can be started with // You can comment out multiple lines or comment out text in the middle of a line using /* */ (e.g. = 1 + /* some comment */ 2 ) Comments might seem to disappear in the formula bar if they are at the end of the line, but they are still there. You can verify this by looking at your code in the Advanced Editor. 来源: https:/

How do I comment in Power Query M?

吃可爱长大的小学妹 提交于 2020-01-12 11:57:09
问题 Is there a way to comment M code / comment out lines or blocks of code? 回答1: M supports two different types of comments: Single line comments can be started with // You can comment out multiple lines or comment out text in the middle of a line using /* */ (e.g. = 1 + /* some comment */ 2 ) Comments might seem to disappear in the formula bar if they are at the end of the line, but they are still there. You can verify this by looking at your code in the Advanced Editor. 来源: https:/