powerbi

PowerBI. Two apparently equal calculated measures are actually different. why?

自古美人都是妖i 提交于 2020-12-15 05:32:40
问题 I end up with the following two calculated measures in Power BI which look semantically equal, but each produces a different result. I'd like to understand why. How does Power BI calculate each so they produce different results? measure1 = VAR var1 = CALCULATE ( [measure], table[column_1] = "some value in column 1" ) VAR var2 = CALCULATE ( var1, table[column_2] = "some value in column 2" ) RETURN var2 Literally, copy the RHS of var1 into its value in var2. measure2 = VAR var2 = CALCULATE (

Add Index without unique values - Power BI / DAX / M

大憨熊 提交于 2020-12-15 05:03:40
问题 I have a column with Countries (in a table, the column have duplicates) and I need to order them with a index: Countries, Desirable index A 1 B 2 B 2 C 3 D 4 D 4 E 5 I can't remove the duplicates because I need the other columns for reference thanks 回答1: Create a table of only distinct countries, index that table, then merge/join that table back to your existing table (the one with duplicates) and expand the index column you just created. 来源: https://stackoverflow.com/questions/65145128/add

How to export data from Zoho Expense site to Power BI desktop using the Zoho Creator (Beta) app

隐身守侯 提交于 2020-12-13 20:54:06
问题 I need to export data from Zoho Expense site to Power BI desktop using the Zoho Creator (Beta) app Is that possible? Please let know Also, how can I find the domain, the workspace name, the Application link name and the Report name link as you can see in the Screenshot: And how to get the Authotoken from the Zoho Creator account as you can see in the screenshot: If this method doesn't work, please let me know about other methods. Thanks in advance for the help 回答1: Login ur Creator Account &

Save Power BI embedded report in Database after making changes

。_饼干妹妹 提交于 2020-12-12 04:53:48
问题 I am using power bi embedded package to embed power bi report - https://github.com/microsoft/powerbi-client-react Report is embedded in the edit mode so user can create or edit the report. Now I have a save button and once the user makes changes to the power bi report, I would like to save the report in the database. Can you tell me how can I trigger the report event. It looks like allowed events of save does not work. Also, if I have to get instance of the report after user has made changes

PowerBI: How to get distinct count for a column in a table, while grouping for many columns separately

你离开我真会死。 提交于 2020-12-12 01:55:16
问题 I have a table with multiple date columns, and a single label column, as shown by following code Data = DATATABLE ( "Date1", DATETIME, "Date2", DATETIME, "Label", STRING, { { "2020-01-01","2020-01-02", "A" }, { "2020-01-01","2020-01-01", "A" }, { "2020-01-01","2020-01-02", "B" }, { "2020-01-01","2020-01-01", "D" }, { "2020-01-01","2020-01-02", "E" }, { "2020-01-02","2020-01-01", "A" }, { "2020-01-02","2020-01-02", "B" }, { "2020-01-02","2020-01-01", "C" } } ) I want to plot a chart of count

PowerBI: How to get distinct count for a column in a table, while grouping for many columns separately

Deadly 提交于 2020-12-12 01:50:40
问题 I have a table with multiple date columns, and a single label column, as shown by following code Data = DATATABLE ( "Date1", DATETIME, "Date2", DATETIME, "Label", STRING, { { "2020-01-01","2020-01-02", "A" }, { "2020-01-01","2020-01-01", "A" }, { "2020-01-01","2020-01-02", "B" }, { "2020-01-01","2020-01-01", "D" }, { "2020-01-01","2020-01-02", "E" }, { "2020-01-02","2020-01-01", "A" }, { "2020-01-02","2020-01-02", "B" }, { "2020-01-02","2020-01-01", "C" } } ) I want to plot a chart of count

DAX measure to sum only numeric values on string column with both numbers and strings

旧时模样 提交于 2020-12-08 02:54:39
问题 How to create DAX measure to sum up only numeric values? Suppose we have simple sample data as below. I thought that this code might do the job, but it failed. m1 = IF( MAX(Table1[category]) = "apples", SUM(Table1[units]) , BLANK() ) When I try to add this measure to the table, which has applied filters for apples and plums only, I get the error message: I need something that will apply filter first, seeding out text values, then do the summing up on numeric values only. 回答1: This is a

DAX measure to sum only numeric values on string column with both numbers and strings

左心房为你撑大大i 提交于 2020-12-08 02:54:37
问题 How to create DAX measure to sum up only numeric values? Suppose we have simple sample data as below. I thought that this code might do the job, but it failed. m1 = IF( MAX(Table1[category]) = "apples", SUM(Table1[units]) , BLANK() ) When I try to add this measure to the table, which has applied filters for apples and plums only, I get the error message: I need something that will apply filter first, seeding out text values, then do the summing up on numeric values only. 回答1: This is a

Find difference between two rows by usind Dax in Power BI

十年热恋 提交于 2020-12-07 04:53:53
问题 I have three column one is Id(ID is same) 2nd col is amount and third is date, I want difference between two rows(amount) 回答1: As you want to have the previous value of the date where the ID is equal, you can use the following: Add a column, Column4 = var baseFilter = FILTER(DiffRows;DiffRows[Column1] = EARLIER(DiffRows[Column1])) var selectDate = CALCULATE(LASTDATE(DiffRows[Column3]);baseFilter; FILTER(baseFilter; DiffRows[Column3] < EARLIER(DiffRows[Column3]))) return DiffRows[Column2] -

Find difference between two rows by usind Dax in Power BI

陌路散爱 提交于 2020-12-07 04:51:49
问题 I have three column one is Id(ID is same) 2nd col is amount and third is date, I want difference between two rows(amount) 回答1: As you want to have the previous value of the date where the ID is equal, you can use the following: Add a column, Column4 = var baseFilter = FILTER(DiffRows;DiffRows[Column1] = EARLIER(DiffRows[Column1])) var selectDate = CALCULATE(LASTDATE(DiffRows[Column3]);baseFilter; FILTER(baseFilter; DiffRows[Column3] < EARLIER(DiffRows[Column3]))) return DiffRows[Column2] -