Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
Hi, guys and girls.
I need to filter a table results using different types of date (invoice date, ship date and delivery date):
But how the active relationship is between dCalendar[Date] and fInvoice[Invoice date], I don´t knoww how to do it:
Any ideas? Please see tests tables below:
fInvoices
let
Fonte = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("fdBLCoAwDATQq0jWgklq/aw9RnHpUgQ/99dKi9OKQjcDzes0zpFQScOx7cs8rYUPLNV1lNUHwxDYVqwxCDPTWDpSBDRce2YEZhJAI2BeDRDQDh9NGtgA1AjUdzcAxGbhaRABi4DJgfQLGKQPQPMLmM8Q59t8BT+lk300HhhP", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [IDInvoice = _t, Customer = _t, #"Invoice Date" = _t, #"Ship Date" = _t, #"Delivery date" = _t, Total = _t]),
#"Tipo Alterado" = Table.TransformColumnTypes(Fonte,{{"Delivery date", type date}, {"Ship Date", type date}, {"Invoice Date", type date}, {"Total", type number}, {"IDInvoice", Int64.Type}})
in
#"Tipo Alterado"
dDate Type
let
Fonte = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WcknNySxLLapUcEksSVSK1YlW8swry89MTlVISSxJBQsEZ2QWQHmxAA==", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Type = _t]),
#"Tipo Alterado" = Table.TransformColumnTypes(Fonte,{{"Type", type text}})
in
#"Tipo Alterado"
@CSpina You can do this using the USERELATIONSHIP function to specify the relationship that you want. Another way to do this is to have "role playing dimensions", in other words, one date table for each of your date types, shipping, invoice and delivery.
User | Count |
---|---|
107 | |
87 | |
81 | |
76 | |
71 |
User | Count |
---|---|
112 | |
105 | |
96 | |
74 | |
66 |