Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hello,
I have searched all over for this answer and cannot find anything similar.
I have 4 years of data and I want to be able to say Brand A was promoted 25 times in 2019 and 27 weeks Non Promoted and then x# of times in 2020, etc. Or say the same thing in a month or however many of weeks selected in my slicer. In my example below I have 2 weeks of data and want to say in those two weeks Brand A = 1 Week Promoted and 1 Week Non Promoted
But when I do anything like a CountA I get the number of rows that Brand A was listed in a week (numerous times since many items make up that brand) Promo or Non Promo...so for on
e month I got Brand A = 633 vs 4 weeks Promoted.
My Data Table is called SalesVT
Item Description | Brand | Week Ended | Sales | PROMOTIONS |
Item 1 | Brand A | 1/5/2019 | $1,000 | Promo |
Item 2 | Brand A | 1/5/2019 | $2,000 | Promo |
Item 3 | Brand B | 1/5/2019 | $1,500 | Non Promo |
Item 3 | Brand B | 1/5/2019 | $700 | Non Promo |
Item 4 | Brand B | 1/12/2019 | $500 | Non Promo |
Item 5 | Brand A | 1/12/2019 | $800 | Non Promo |
Item 6 | Brand A | 1/5/2019 | $900 | Promo |
Item 7 | Brand B | 1/12/2019 | $200 | Non Promo |
Item 6 | Brand A | 1/5/2019 | $900 | Promo |
Item 7 | Brand B | 1/12/2019 | $200 | Non Promo |
I want the Table to look like the following : Assume 2 Weeks in Data: | ||||
Non Promo | Promo | |||
Brand A | 1 | 1 | ||
Brand B | 2 | 0 |
|
Solved! Go to Solution.
you can try this
non promo = CALCULATE(DISTINCTCOUNT('Table'[Week Ended]),'Table'[PROMOTIONS]="Non Promo")
promo = CALCULATE(DISTINCTCOUNT('Table'[Week Ended]),'Table'[PROMOTIONS]="Promo")+0
Proud to be a Super User!
Thank you! It worked! I guess I was thinking it would be one formula and not 2. Now onward to getting my average sales by these formulas to work! You may hear from me again!
you are welcome
Proud to be a Super User!
you can try this
non promo = CALCULATE(DISTINCTCOUNT('Table'[Week Ended]),'Table'[PROMOTIONS]="Non Promo")
promo = CALCULATE(DISTINCTCOUNT('Table'[Week Ended]),'Table'[PROMOTIONS]="Promo")+0
Proud to be a Super User!
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
114 | |
99 | |
83 | |
70 | |
61 |
User | Count |
---|---|
149 | |
114 | |
107 | |
89 | |
67 |