dax

How to create dynamic ranking that would respond by date slicer in Power bi

北城余情 提交于 2020-01-16 08:05:12
问题 I simply need to create ranking column for each ClaimantID based on TransactionDate DESC. example .pbix file can be found here: https://www.dropbox.com/s/9dsnylng70t5a8i/Count%20Open%20and%20Closed%20at%20Point%20of%20time.pbix?dl=0 On a picture below I have two unique claims with TransactionDate. So how can I RANK ClaimantID by TransactionDate in descending order? I tried to create column Rank. But it does not give me desirable result: Rank = RANKX( CALCULATETABLE( Claimants ,ALLEXCEPT

Sum distinct values for first occurance in Power BI

杀马特。学长 韩版系。学妹 提交于 2020-01-14 04:14:15
问题 In Power BI I have some duplicate entries in my data that only have 1 column that is different, this is a "details" column. Name | Value | Details Item 1 | 10 | Feature 1 Item 1 | 10 | Feature 2 Item 2 | 15 | Feature 1 Item 3 | 7 | Feature 1 Item 3 | 7 | Feature 2 Item 3 | 7 | Feature 3 I realize this is an issue with the data structure, but it cannot be changed. Basically, when I sum up my Value column on a Power BI card, I only want it to sum for each unique name, so in this case: Total =

Average of Each months last date (MAX date) value

孤街浪徒 提交于 2020-01-14 03:34:07
问题 I am looking to calculate AVG OF EACH Month's last date (MAX date) value. Below is the sample data. Can you please someone help me with the DAX caluclations. Much appreciated. Please let me know if you need more information. Location DATE NAME VALUE P1 1/1/2019 0:00 ABC 12 P1 1/2/2019 0:00 ABC 4 P1 1/3/2019 0:00 ABC 50 P1 1/4/2019 0:00 ABC 8 P1 1/5/2019 0:00 ABC 35 ABC MaxDate value of JAN P1 1/1/2019 0:00 DEF 20 P1 1/2/2019 0:00 DEF 25 P1 1/3/2019 0:00 DEF 66 P1 1/4/2019 0:00 DEF 24 P1 1/5

How to Show last period (Fiscal Year) of sale, based on multi-filters report

被刻印的时光 ゝ 提交于 2020-01-13 07:07:18
问题 I tried create a dashboard based on fiscal year, with more Filters, like region, sales rep name, ... Example files avaliable on dropbox: https://www.dropbox.com/sh/l25kdz6enmg35yb/AABPuOk3kKOpfQdKDfRUcnX2a?dl=0 On my closest attempt, i tried this follow: Add one column on my data set, naming each period as distinct number, like: "17";"18";"19", due to deslocated fiscal year (april to march). Then create a measure: PREVIOUS CROP_YEAR = SWITCH(TRUE(); SELECTEDVALUE('dataset'[Crop-X])=16;

How to Show last period (Fiscal Year) of sale, based on multi-filters report

大兔子大兔子 提交于 2020-01-13 07:06:30
问题 I tried create a dashboard based on fiscal year, with more Filters, like region, sales rep name, ... Example files avaliable on dropbox: https://www.dropbox.com/sh/l25kdz6enmg35yb/AABPuOk3kKOpfQdKDfRUcnX2a?dl=0 On my closest attempt, i tried this follow: Add one column on my data set, naming each period as distinct number, like: "17";"18";"19", due to deslocated fiscal year (april to march). Then create a measure: PREVIOUS CROP_YEAR = SWITCH(TRUE(); SELECTEDVALUE('dataset'[Crop-X])=16;

How to Show last period (Fiscal Year) of sale, based on multi-filters report

僤鯓⒐⒋嵵緔 提交于 2020-01-13 07:06:08
问题 I tried create a dashboard based on fiscal year, with more Filters, like region, sales rep name, ... Example files avaliable on dropbox: https://www.dropbox.com/sh/l25kdz6enmg35yb/AABPuOk3kKOpfQdKDfRUcnX2a?dl=0 On my closest attempt, i tried this follow: Add one column on my data set, naming each period as distinct number, like: "17";"18";"19", due to deslocated fiscal year (april to march). Then create a measure: PREVIOUS CROP_YEAR = SWITCH(TRUE(); SELECTEDVALUE('dataset'[Crop-X])=16;

DAX ALLEXCEPT to sum by category of multiple dimension tables

冷暖自知 提交于 2020-01-11 13:49:11
问题 I would like to calculate total by category. The category is in the dimension table. Here is sample file: DAX ALLEXCEPT total by category.pbix I have the following model: These are my expected results. Total by Color: I thought I could achieve expected results by the following measure: ALLEXCEPT_color = CALCULATE ( [Sales], ALLEXCEPT ( FactTable, -- surprisingly 'dim1' table in that place gives wrong results dim1[Color] ) ) Or alternatively using method suggested by Alberto Ferrari https:/

How to calculate cumulative Total and % in DAX?

拜拜、爱过 提交于 2020-01-10 04:21:06
问题 This might be very simple... I have the below summary table in Power BI and need to build a Pareto Chart, what I'm looking for is a way to create columns "D" and "E"... Thanks in advance! The Count from column "B" is a measure I've created in PBI based on multiple filters. I've already tried some Calculate/Sum/Filter type of expressions with no luck. My raw data looks like Image #2... I have the measures to build the summary table with the exception of column "I" - Running % - (for which I

2nd latest Date - DAX

非 Y 不嫁゛ 提交于 2020-01-07 06:24:05
问题 I have a dataset of users who log into an app. I want to find the # of days between their last two logins. I have the DAX expression to get their last login (latest date) =CALCULATE(Max([Date]),ALL(Table1),Table1[Name]=EARLIER(Table1[Name])) But now I'd like to get their 2nd to last login, and subtract the two. I see some posts about the 2nd to last login, but it puts a blank if there are only two logins, whereas I want the number of days between these as well. 回答1: dcheney , this one is

Sum row with next row value and grab next value in other column for the date selected

谁都会走 提交于 2020-01-06 08:21:31
问题 Let's say I have this data: Earn Earn Cum. 13-Apr - - 14-Apr 48 48 15-Apr 257 305 16-Apr 518 823 17-Apr 489 1,312 18-Apr 837 2,149 19-Apr 1,005 3,154 20-Apr 1,021 4,175 21-Apr 1,463 5,638 22-Apr 2,630 8,268 23-Apr 2,993 11,261 24-Apr 3,354 14,615 25-Apr 4,332 18,947 26-Apr 4,885 23,832 27-Apr 4,514 28,346 28-Apr 4,356 32,702 29-Apr 4,824 37,526 30-Apr 7,082 44,608 1-May 6,091 50,699 2-May 1,407 52,106 When a date is selected in a dropdown slicer for example: 1-May I'd like to sum the rows 1