Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
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:
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
66 | |
54 | |
47 | |
36 | |
34 |
User | Count |
---|---|
84 | |
70 | |
58 | |
45 | |
44 |