Dynamic fields / select fields from filters (launched)

Jamie Davidson · Friday Demos · May 3, 2024 · 7:59

The launch of dynamic fields in Omni, allowing tables columns to be controlled by filters entirely in the front-end - timegrain swappers, dimension swappers, and measure swappers are now…

Try it yourselfThe full week on docsmodelingworkbook

Transcript

This transcript is auto-generated. Names and product terms may be wrong.

  1. I can demo a a followup um and thanks to Sarah Alyssa Richards Stephen for uh kind of continued to help here um so we shipped and this is live for folks now the field picker I demoed a little while ago um just to show folks what this looks like uh again real quick um I'm going to add a time frame selector now to this query I'm going to add sales price some uh and I can now toggle between any of the time frames that are pre-specified on this field inside the model um so here I'll just put put quarter in we can also add a field selector um this field selector basically lets us pick uh from any field in inside the model um and

  2. we've got a little bit of control so I'm going to call these you know let's let's call this selector measures and I want to include order items count so maybe as a a way of curating oops items count I spell it right um so I'll update this so it's a way of curating the end user experience to be able to pick from you know maybe a number of different measures so in this case you know we'll swap order items count to some this also would let you do things like um change formatting so if you've got a number of different model fields that have potentially different formats or you know maybe it's even the same same field so sales price some and you want some

  3. of them to look like accounting based formatting or some of them to look like you know I don't know IDs with no commas or something like that you could basically you could do that too uh we're working on adding this to a dashboard so that the the controls which we're sort of calling them will basically be able to be powered by that you could have say for example a time frame selector that's going to span across you know a bunch of different uh charts and have kind of you can think of them almost like a superet of filters filters are like a subset of what a control is and being able to have have uh configuration around around that also but that that's a a

  4. followup so right now it's just live inside the workbook awesome um for the formatting thing Jamie I'm assuming that you just toggle between both and format them the way you want them and they will just persist when you toggle back and forth is that sort of the idea yeah exactly basically very literally we are just swapping out the field reference in the query so like whatever you've got inside there you you can do um I I thought about um adding the like the easy quick a thing so like doing like a dimension to sum or count or something um but it was it was a little bit more uh more I don't think you need it yeah I think a follow on I bet there

  5. are other like little things that we could do there's also probably little things we could do on formatting that one one actually maybe one example I can show here sorry uh that I I thought was kind of a cool a cool one um sort of a dimensional selector too and eventually I'd love to get this to be you know sort of smart and and hierarchical so we can actually understand it but like let's say you want you know country State oops you want country and I'm going to create a new field selector here it's not on measures this is going to be like a region selector say as an example and then I also want to be able to toggle between state or city just

  6. as you know what picking the granularity of of the data you want to there's like sort of there it'd be interesting you know none of this is modeled this is all presentation logic and and ways of updating Fields there certainly going to be desire to have reusability here so like a regional selector may make a ton of sense too some of this might be modeled Concepts also that we want to basically have flow through um it it's sort of like the measure selector could be something kind of like a drill field or drill drill set it's sort of like interrelated objects so you know I think it's something where we don't have any model or governance associated with it yet it really is presentation layer

  7. but I think we can kind of evolve it over time too one other quick question uh will the content validator be able to hit these oh not yet that's a good okay a good good call out there okay yeah just file a ticket for that one just to make sure yeah that that's definitely worth worthwhile to think about and then maybe also also worth noting it should in theory work updating viz configuration so like it's a little bit it's a little bit strange but like say you've got an x-axis that's the time frame you course want to have that that time frame be swapped out too some of the formatting or or labeling and stuff doesn't really make sense actually if you swap it between

  8. them two so like I think it's it's uh it's a it's something we should probably think about play with and think about I don't think that it's definitely not optimal it's it's along the lines of how do we uh retain State on the viz but then update it when Fields change I think it really is the same problem what about Cals if I'm referencing B1 will it stay when we swap in between or will it break Cals I think it breaks Cals because I think that the B1 isn't a basically it's translated immediately to the field reference to and we do not up so you'll get an error that basically says like you're referencing a field that doesn't exist inside the query you want to

  9. remove that and so like not not ideal but I think actually still probably reasonable the it's sensible I could see people actually though want like you could just Envision a ratio and you want to look at it like per user or per def or something like that and have the Cal update um so like maybe building support for that down the line would be interesting yeah it it does update uh pivots subtotals row totals too so like you will be swap those out those are just cleaner and easier to do the swap I think Cals at least in theory would be possible it's just uh they're just a more it's like a nested object thing yeah yeah I could see it for like change for

  10. example like you want the measure and then you want the change on top of it but I mean the fact that we like is already pretty awesome yeah yeah I mean it's pretty cool because you can play around it's like super fun to play around in the viz like you can just be like look I can like make my heat map switch between like you know different granularities for the dates on because you can add a time frame selector like like you can have two on the same thing so you can do like uh it's it's pretty neat um it'll be really neat to see what people start making with it yeah and and there's also almost certainly going to be stuff that feels not

  11. thought through yet so like on the viz some of some of like changing the the uh granular data feels weird because it feels weird when you switch the granular data of queries and stuff to you get like some of the Sawtooth you know behaviors so like I think we want to think about that holistically how do we you know use the query to generate Auto configs that are smart that retain as much metadata as we can but but not the simple use cases should still work great though like time if you're measure swapping on a line is still going to work great yeah hey Jamie regarding your point about switching Dimensions changing the viz um I've been deep in that work for a couple weeks

  12. now so just please let me know if you're going to do anything there oh yeah I I'm not going to I I probably won't you you you take it and run I'm not proba I'll I'll muck with the query and you can you can change anything in the vi appreciate that thank you yeah no no no worries at all