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.
Hi everyone,
Could someone assist me with a DAX formula?
Firstly, I have the following data model:
I possess a Date table that enables me to define a date range using a slicer.
I maintain a list of articles, named "Articles," with "cod_art" as the primary key.
I also have a list of sales, named "Sales," which is linked to the "Articles" table via the "cod_art" field, along with two other fields indicating the sales quantity and date.
Additionally, there's a final table named "Article_price_list," detailing price variations for each article. This table is connected to the "Articles" table through the "cod_art" field, providing the article's price and the effective date of that price.
My objective is to create the following matrix:
I can set a date range, and within this range, the matrix will display the effective date for each article. However, what I'm struggling with is creating a DAX formula to calculate the sum of quantities sold for each effective date (i have to calculate the actual number of the sum, not the whole text in the above image).
I would greatly appreciate it if someone could offer their assistance with this matter.
Thank you very much!
Hi @BI_user2023
You can use sumx function.
e.g
Measure=SUMX(Article,[price]*[quantity]))
If the function cannot meet your requirement, can you provide some sample data or file so that can provide more useful suggestion for you.
Best Regards!
Yolo Zhu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
User | Count |
---|---|
25 | |
10 | |
8 | |
6 | |
5 |
User | Count |
---|---|
31 | |
11 | |
10 | |
10 | |
9 |