Masha Akatieva
08/02/2024, 12:22 PMFrancisco Antunes
08/02/2024, 3:47 PMReward Value fact by the SaaS State attribute, correct?
This can be achieved via Explicit Lifting, utilizing the BY keyword (as you noted). Based on one of the examples from the article (which is for our Classic UI, but is still functional), youād be looking for a metric a bit like this:
SELECT MAX(( SELECT (( SELECT SUM(Reward Value) BY Brand Key)) BY SaaS State Key))
The article explains in more detail what each part of this metric does, but in short it will allow you to slice Reward Value by SaaS State and SaaS Date.
Iām not sure about comparing the Created at date dimension with SaaS Date in this example. As I mentioned, you should be able to use the latter to slice this report, but Iād recommend experimenting with the syntax to see if the comparison will work out on your LDM.
Let me know if you have any more questions or additional details about the use-case to help us come up with some solution!Masha Akatieva
08/05/2024, 8:31 AMMasha Akatieva
08/06/2024, 4:48 PMFrancisco Antunes
08/06/2024, 7:19 PMDim Saas States dimension and still be able to slice the metric by Dim Display Currency .
It is hard to assist with the implementation of LDMs, because they are each so unique to a customerās data and needs (and itās also a bit beyond our scope); That said, something that could help you out here would be to invert the connection point between the Saas States and Brand datasets. This would require adding a reference key from first into the latter, and would also change how they interact: You would be able to slice the data from Brand with the SaaS States objects.
Iām not sure how that would affect your overall use-case, but it would allow for slicing the facts from Fact Rewards with these datasets without needing any fancy BY metrics.
Lastly, the (( double brackets donāt actually do anything š
They were described like that in our classic docs, but they are not necessary. I tested the metric without them and it worked nicely.