Starting December 3, join live sessions with database experts and the Microsoft product team to learn just how easy it is to get started
Learn moreGet certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now
I cant share much of my report, because it has sensative insurance and personal information.
We work in automotive. I have a large data table that collects reviews of repairs and processes per vehicle. Currently I am trying to create a type of 'queing' system. Some vehicles may not be worth it to repair. So, when my team finds these vehicles, they tag their 'review' (A) with a checkbox. This check box is to alert another team that we need to perform an additional step (B) on this specific vehicle.
Working in dynamic sheets was sort of getting it done, but lots of duplications and other such stuff. So I figured I could get this on power bi. So what I did in my old dynamic sheets was create an automation to copy the rows when review "A" gets tagged. So a tagged review copies to another 'queue' sheet. This sheet looks back at my live data for the same vehicle, and once it finds that the tagged line is no longer the most recent, and that now a line with review "B" is most recent (index function), it filters out that result. So, basicaly, I need to see row A, until row B happens, then dont show it anymore.
A & B are values in two different coilumns. So it looks sort of like below....
Date | Vehicle ID | Other data | Tag | Action | Other data | Other data | other data |
12/13 | 234 | A | |||||
12/12 | 123 | B | |||||
12/12 | 789 | D | |||||
12/11 | 123 | A |
So, in the above example, Vehicle "123" would have been on my queue matrix on 12/11 but then it would filter out on 12/12 because action B was completed. Vehicle "234" would still be on the queue matrix. Vehicle "789" does not apply to the condition.
Currently, I can filter out Action B items by using a measure to tag the 'most recent' row for the Vehicle ID.
Date | Vehicle ID | Tag | Action | Misc | Misc | Max Date | Is max |
12/13 | 123 | 12/13 | Y | ||||
12/13 | 234 | 12/13 | Y | ||||
12/12 | 234 | =max(collect(Date, Vehicle ID) | =if(Max Date=Date, "Y", "") | ||||
12/11 | 123 | 12/13 |
Solved! Go to Solution.
Thanks for the suggestion. I ended up grouping by vehicle ID, copying the grouped columns, using one to expand only the max date and then expanded the rest. Then, added custom column, if row date=max date, "1" else null. So I was able to filter to only the absolute most recent info at a table level instead of a filter level.
The filters via measure were causing a problem because the application of the ilter seemed to be arbitrary...as in, when I wanted only the max date with the tag on line "A", it was grabbing the tag first, then returning the most recent with the tag. I had to 'remove' all older rows from the table first.
Once I was able to understand how the grouping works, it went smoothly. I forget how often using duplicate tables can be helpful. I also duplicated the entire data set so, while only showing the most recent row in the matrix, I also added a smaller visual to show the history of that vehicle ID when selected in the matrix.
Worthy of note, I also ended up with a boolean error when publishing to the online app. One of my tag columns didnt like being a number/text, and needed to be True/False to avoid confusing the app level data refresh. Double check your column data types everyone.
Hi @mabCOLONEL ,
Do you want to selecte the IDs that have Tag A and no action B?
If so, please try:
Flag =
var _a = SELECTCOLUMNS('Table',"Tag",[Tag])
var _b = SELECTCOLUMNS('Table',"Action",[Action])
return IF("A" in _a&&NOT("B" in _b),1,0)
Then apply it to the visual level filter:
Final output:
If you want to add a column to find if the date is the max date, you can try:
Is MAX =
var MaxDate = MAXX(FILTER('Table',[Vehicle ID]=EARLIER('Table'[Vehicle ID])),[Date])
return IF([Date]=MaxDate,"Y")
Final output:
Best Regards,
Jianbo Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Thanks for the suggestion. I ended up grouping by vehicle ID, copying the grouped columns, using one to expand only the max date and then expanded the rest. Then, added custom column, if row date=max date, "1" else null. So I was able to filter to only the absolute most recent info at a table level instead of a filter level.
The filters via measure were causing a problem because the application of the ilter seemed to be arbitrary...as in, when I wanted only the max date with the tag on line "A", it was grabbing the tag first, then returning the most recent with the tag. I had to 'remove' all older rows from the table first.
Once I was able to understand how the grouping works, it went smoothly. I forget how often using duplicate tables can be helpful. I also duplicated the entire data set so, while only showing the most recent row in the matrix, I also added a smaller visual to show the history of that vehicle ID when selected in the matrix.
Worthy of note, I also ended up with a boolean error when publishing to the online app. One of my tag columns didnt like being a number/text, and needed to be True/False to avoid confusing the app level data refresh. Double check your column data types everyone.
Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.
User | Count |
---|---|
94 | |
87 | |
82 | |
71 | |
49 |
User | Count |
---|---|
143 | |
123 | |
107 | |
61 | |
55 |