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 have a logging tool that reports me these column in the table "IMPORT"
[date][time][table][rows loaded]
So for example
01/10/2018 - 16:30 - table x - 100
01/10/2018 - 16:30 - table y - 250
So when I want to have the amount of rows loaded on a certain date, it's fairly easy with a visual.
I have then this visual
table | Last Import
table x | 100
table y | 250
TOTAL | 350
Works fine
However, sometimes the importin runs twice so I have things like
01/10/2018 - 16:30 - table x - 100
01/10/2018 - 16:40 - table x - 120
01/10/2018 - 16:30 - table y - 250
01/10/2018 - 16:40 - table y - 257
In cases like this I would like to have, in the report only the rows where the date is the max, given a certain date.
So I wrote this DAX:
Last Import = SUMx(filter('Import';max('Import'[time]));'Import'[rows])
My concept is: filter my table import on the max value of import[time] and sum the [rows].
Now this works EXCEPT for the total, so I have something like
table | Last Import
table x | 120
table y | 257
TOTAL | 727
It's like the measure is not filtered on the total row
What am I doing wrong? Thanks
Solved! Go to Solution.
Hi,
Try using this formula to create a calculated column and use this new calculated column for your purpose.
LastLoadedRowCount = IF('Import'[Time]=MAXX(FILTER(ALL('Import'),EARLIER('Import'[Table])='Import'[Table] && EARLIER('Import'[Date])='Import'[Date]),'Import'[Time]),1,0) *'Import'[RowsLoaded]
Hi,
Try using this formula to create a calculated column and use this new calculated column for your purpose.
LastLoadedRowCount = IF('Import'[Time]=MAXX(FILTER(ALL('Import'),EARLIER('Import'[Table])='Import'[Table] && EARLIER('Import'[Date])='Import'[Date]),'Import'[Time]),1,0) *'Import'[RowsLoaded]
@Anonymous Could you please try with a simple "Table" visual, having TableName and Rows field as values... It should work fine, as you have all fields in single table that are required, also you can have a date slicer to select a particular date as well.
Not sure, why you are using DAX expressions for this
Proud to be a PBI Community Champion
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 |
---|---|
110 | |
97 | |
78 | |
64 | |
55 |
User | Count |
---|---|
143 | |
109 | |
89 | |
84 | |
66 |