Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
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
User | Count |
---|---|
141 | |
113 | |
104 | |
77 | |
64 |
User | Count |
---|---|
135 | |
123 | |
101 | |
71 | |
61 |