The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
I'm measuring promotional effectiveness and want to find the average daily amount of $ made of certain products when they're not on promotion.
I've got the following measure for calculating average $ made each week:
Solved! Go to Solution.
Apologies for the long delay in replying.
Thank you very much for offering your help but in the end I used a bridge table to get around this issue and now I can get it to work.
Hi @Anonymous
what is the relationship between Sales and DimPromotion?
Hi @tamerj1
the relationship is many to one. I created an index for each row in Promotions and joined it to ProductID in my Sales table.
@Anonymous
Sorry but can I ask which columns are you using in your table/matrix?
My table has these columns so far:
1. Sales[ProductID]
2. Product'ProductName]
3. Total amount $ made during promotion for respective product (measure)
Product table is joined to Sales through ProductID, just like Promotion.
I'd like for column 4 and 5 to represent average daily amount $ made for each product, during promotion and outside the promotion.
I'm new tp power bi so apologies for any ambiguity!
Good Moring @Anonymous
Sorry for the late response, it was too late last night. Let's start trying the following
None Prpotion Sales =
VAR _StartDate =
CALCULATE (
MAX ( DimPromotion[StartDate] ),
CROSSFILTER ( Sales[Index], DimPromotion[Index], BOTH )
)
VAR _EndDate =
CALCULATE (
MAX ( DimPromotion[EndDate] ),
CROSSFILTER ( Sales[Index], DimPromotion[Index], BOTH )
)
RETURN
CALCULATE (
SUM ( Sales[Sales_Value] ),
DimDate[Date] < _StartDate
&& DimDate[Date] > _EndDate
)
Hi @tamerj1
Thanks for your reply!
This gave blank values unfortunately. Do you know what could possibly cause this?
Hi @Anonymous
Would you like to connect perhaps via teams to zoom?
Apologies for the long delay in replying.
Thank you very much for offering your help but in the end I used a bridge table to get around this issue and now I can get it to work.
User | Count |
---|---|
16 | |
8 | |
7 | |
6 | |
5 |
User | Count |
---|---|
25 | |
13 | |
12 | |
8 | |
8 |