The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
Hello,
I have a dataset where I am getting multiple rows for a combination of attributes for different dates. I want to filter the rows based on maximum date for the selected attributes. Here is the dataset example and what I am looking for.
TestName | Metric | LatestBatch | WeekID | Source Value | Target Value | Execution Date |
Test1 | A | 202007231120 | w192005 | 0 | 10000 | 23/07/2020 |
Test1 | A | 202008051029 | w192005 | 300 | 310 | 03/08/2020 |
Test1 | A | 202007291135 | w192005 | 2400 | 200 | 29/07/2020 |
Expected Output:-
Flag is the column I want in dataset and it would be great if this can come through a measure rather than calculated column.
TestName | Metric | LatestBatch | WeekID | Source Value | Target Value | Execution Date | Flag |
Test1 | A | 202007231120 | w192005 | 0 | 10000 | 23/07/2020 | 0 |
Test1 | A | 202008051029 | w192005 | 300 | 310 | 03/08/2020 | 1 |
Test1 | A | 202007291135 | w192005 | 2400 | 200 | 29/07/2020 | 0 |
Thanks.
@Anonymous , on what bases Date needs to be selected is not clear. Can you please explain with an example.
See example
if(Max(Table[Execution])= calculate(max(Table[Execution]), allexcept(Table[TestName])), "Yes","No")
Appreciate your Kudos.
Can you please modify this to All instead of AllExcept. I have added this to report but it looks like it is working on the remaining grouping except TestName & WeekID while I want it to work only for this grouping. Adding any more attributes in the grid should not change the result. When I try All in the same formula, I get an error - "Multiple table arguments are not allowed in the ALL/ALLNOBLANKROW function."
Thanks for quick reply, I will try it out.
I need the grouping on TestName and WeekID and find max Execution Date rows.
User | Count |
---|---|
28 | |
12 | |
8 | |
7 | |
5 |
User | Count |
---|---|
36 | |
14 | |
12 | |
7 | |
7 |