Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi,
I’ve mapped a Power BI dashboard to a folder where a new excel file is uploaded at the beginning of every month. I’ve built the Power BI dashboard to combine/merge these files together in to one large table within Power BI. When a new excel file is added to the folder at the beginning of the month, when I refresh the Power BI dashboard, Power BI reaches out to the folder and brings in the contents of the latest file, ultimately adding it to the existing table in Power BI.
The merged table in Power BI is called 'Data Files'. The table has nearly 70 columns but here is a condensed slimmed down version of the data/table in Power BI:
Name Latest_A1C Acct_Name Diabetes_IND Source Date Member ID
Jesse 5.1 Ford 0 02/01/2020 0005
Matt 7.3 BMW 1 02/01/2020 1001
Andy 6 Dodge 1 02/01/2020 7000
Jesse 3.2 Ford 1 03/01/2020 0005
Matt 7 BMW 1 03/01/2020 1001
Andy 5.9 Dodge 0 03/01/2020 7000
Jesse 1.1 Ford 1 04/01/2020 0005
Matt 7.7 BMW 1 04/01/2020 1001
Andy 6.0 Dodge 0 04/01/2020 7000
I'd like to create a new measure that will subtract the most recent value in the [Latest_A1C] field based on it's [Source Date] field from the second most recent value in the [Latest_A1C] field based on it's [Source Date] field for each member.
For example, based on the example above, I'd want the new created measure to return the following results for Jesse, Matt and Andy.
-2.1 for Jesse (1.1 minus 3.2 = -2.1)
0.7 for Matt (7.7 minus 7 = 0.7)
0.1 for Andy (6.0 minus 5.9 = 0.1)
I've posted this question earlier this weekend and another user started to help me. However, I can't seem to get the solution to work. Here is what I've tried creating without success:
Solved! Go to Solution.
@AW1976NOVA , try a new column like
column =
var _index = maxx(filter(table, [Name] = earlier([Name]) && [Acct_Name] = earlier([Acct_Name]) && [Source Date] < earlier([Source Date]) ) ,[Source Date])
return
maxx(filter(table, [Name] = earlier([Name]) && [Acct_Name] = earlier([Acct_Name]) && [Source Date] =_index ) ,[ Latest_A1C]) - [Latest_A1C]
@AW1976NOVA , try a new column like
column =
var _index = maxx(filter(table, [Name] = earlier([Name]) && [Acct_Name] = earlier([Acct_Name]) && [Source Date] < earlier([Source Date]) ) ,[Source Date])
return
maxx(filter(table, [Name] = earlier([Name]) && [Acct_Name] = earlier([Acct_Name]) && [Source Date] =_index ) ,[ Latest_A1C]) - [Latest_A1C]
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
109 | |
98 | |
77 | |
66 | |
54 |
User | Count |
---|---|
144 | |
104 | |
101 | |
86 | |
64 |