The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hi, Hope you are doing well.
I am facing a calculation. I got the sum of units of previous of my 4 months from today. However, it is not doing ok the calculation if I give a % to a certain brand. If I apply the same weight, it works fine.
Do you know what it is wrong?
Thanks for your help!
Clara
Ok, I just shared with you via LinkeIn. Thanks!
Hi @clarainesgg ,
First of all thanks to Ritaf1983 for the quick reply. I have some other thoughts to add:
You can create this measure.
test = SWITCH(TRUE(),
MAX('Sell-In'[Nombre])="VA",[Previous_4_Months_Units]*0.7,
MAX('Sell-In'[Nombre])="CEI",[Previous_4_Months_Units]*0.6,
MAX('Sell-In'[Nombre])="PRE",[Previous_4_Months_Units]*0.6,
[Previous_4_Months_Units]*0.4)
test2 = SUMX(VALUES('Sell-In'[Nombre]),[test])
Then the result is as follows.
Best Regards,
Neeko Tang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Thanks! It works 🙂
Hi @clarainesgg
Can you please share a pbix or some dummy data that keep the raw data structure with expected results? It should help us clarify your scenario and test to coding formula.
How to Get Your Question Answered Quickly
Hi, Below you could find my template. If you can see, the number is not correct. (I dont know how to attach)
thanks!
Hi @clarainesgg
You can save the file of some kind of public cloud and share it via link.
If I applied this:
User | Count |
---|---|
77 | |
76 | |
36 | |
32 | |
29 |
User | Count |
---|---|
93 | |
79 | |
57 | |
48 | |
48 |