The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hi,
General Question:
If I have a data source that is a excel files in folder, and has appended data from multiple dates, and has an additional column with date of the file.
When using the "SUMMARIZE" dax to create a table, can I add a filter on the data from a column?
ex. = SUMMARIZE(FILTER('SAMPLE', MAX('SAMPLE'[COLUMN]), COLUMN 1, COLUMN 2...)
on my end, it doesn't seem to filter and just keeps all the data from the source and summarizes it all.
Specific example:
I am working on a project where I have 3 separate data tables.
1 of them is called "Open Orders", and is saved everyday. In the table, it contains a column with the "Date of File", which is when the file is saved.
The 2nd one is a "Inventory Count Data" table, where it contains the Inventory Count information and the column "Date of the Count"
Here's what I want it to do:
Within the visuals, after selecting the Slicer, "Date of Count" that I want to see. In the Table Visual, I want to only show the "Open Orders" rows that are the closest to the date of the "Inventory Count Data[Date of Count]".
To get this:
So I did a DateDiff, between the SelectedValue (Date of the Count) and Open Orders[Date of File].
I figured out what is the smallest datediff values in a column.
I am trying to create a new table using the dax Summarize from this "Open Orders" table that is only the rows that contain the smallest datediff values.
OPEN ORDERS SUMMARIZED = SUMMARIZE(FILTER('OPEN ORDERS', MAX('OPEN ORDERS'[DATE DIFF])), COLUMN1, COLUMN 2, SUM(QTY) )
This does not filter, and contains data from all the dates.
Solved! Go to Solution.
I solved it on my own.
Relatively easy, I forgot that I am using the "Group By" in the dax.
So I referenced the date in the Group By and added wrapped the whole calculation with Filter(), and was able to bring in the GroupBy in the argument.
I solved it on my own.
Relatively easy, I forgot that I am using the "Group By" in the dax.
So I referenced the date in the Group By and added wrapped the whole calculation with Filter(), and was able to bring in the GroupBy in the argument.
User | Count |
---|---|
78 | |
74 | |
42 | |
32 | |
28 |
User | Count |
---|---|
104 | |
93 | |
52 | |
50 | |
46 |