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.
I have a table in which I have the value of a product per day, store.
Store | Product | Day | Value |
1 | A | 1 | 1000 |
1 | B | 2 | 500 |
... | ... | ... | ... |
2 | A | 1 | 300 |
2 | B | 2 | 200 |
... | ... | ... | ... |
3 | A | 1 | 800 |
And I need another column that has the sum of the value of store 1 with store 2, but that the value is stored only in store 1, and the rest remain the same, such as the following example table. For store 1, the sum value column will be the sum of store 2 of the product and the corresponding day. And for the other stores (2,3, ..) the value will be the same as value.
Store | Product | Day | Value | Sum value |
1 | A | 1 | 1000 | 1300 |
1 | B | 2 | 500 | 700 |
... | ... | ... | ... | ... |
2 | A | 1 | 300 | 300 |
2 | B | 2 | 200 | 200 |
... | ... | ... | ... | ... |
3 | A | 1 | 800 | 800 |
But it has to be in DAX, since they are calculated columns and I can't see them in power query, how can I do this sum with restrictions?
Hi @nicolasvc ,
According to your description, you can write a single DAX measure, which is more easier.
Best Regards,
Community Support Team _ kalyj
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi,
Please check the below picture and the attached pbix file.
All measures are in the attached pbix file.
User | Count |
---|---|
75 | |
70 | |
39 | |
30 | |
28 |
User | Count |
---|---|
104 | |
95 | |
51 | |
48 | |
46 |