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 have a dimensions table that contains a list of all skus in a system. One of the dimensions is the date that the sku was introduced. It has a relationship with a fact table that has all transactions of all of those materials. This includes the billing date. I have two needs. The first is a calculated column that records the revenue from a transaction if it happened after the date the sku was publicly introduced (we have transactions that happened before public introduction). The second is a calculated column that records the revenue from a transaction if it happened within 1 year of the sku being publicly introduced. For the first need, I'm using the following and it works exactly as expected:
Solved! Go to Solution.
I think it should work if you just add 365 to the [Introduction Date]. Does this give you what you are looking for?
REVENUE_WITHIN_12_MONTHS_OF_INTRODUCTION =
IF (
AND (
RELATED ( 'Material Data'[INTRODUCTION_TYPE] ) = "Public Release",
AND (
RELATED ( 'Material Data'[INTRODUCTION_DATE] ) + 365 >= 'Transactional Data'[BILLING_DATE],
RELATED ( 'Material Data'[INTRODUCTION_DATE] ) <= 'Transactional Data'[BILLING_DATE]
)
),
'Transactional Data'[REVENUE],
BLANK ()
)
I think it should work if you just add 365 to the [Introduction Date]. Does this give you what you are looking for?
REVENUE_WITHIN_12_MONTHS_OF_INTRODUCTION =
IF (
AND (
RELATED ( 'Material Data'[INTRODUCTION_TYPE] ) = "Public Release",
AND (
RELATED ( 'Material Data'[INTRODUCTION_DATE] ) + 365 >= 'Transactional Data'[BILLING_DATE],
RELATED ( 'Material Data'[INTRODUCTION_DATE] ) <= 'Transactional Data'[BILLING_DATE]
)
),
'Transactional Data'[REVENUE],
BLANK ()
)
Holy crap. Talk about overcomplicating something with an elegantly simple solution. This did the trick! Thanks a bunch for the help. Marked as solution!
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 |
---|---|
86 | |
84 | |
83 | |
67 | |
49 |
User | Count |
---|---|
131 | |
111 | |
96 | |
71 | |
67 |