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.
Dear all,
Please advise if there is any way for Power BI to display the weight of each container in the table view when the customer and date are the same. Below is my raw data, and I want the table to be presented as per my raw data.
Job Number | CompletedDate | Customer | Qty | Container Weight |
2893584 | 01/11/2023 | ABC | 1 | 21 |
2893584 | 01/11/2023 | ABC | 1 | 25 |
2893584 | 01/11/2023 | ABC | 1 | 29 |
2893584 | 01/11/2023 | ABC | 1 | 30 |
2893584 | 01/11/2023 | ABC | 1 | 33 |
2893584 | 01/11/2023 | ABC | 1 | 36 |
2893584 | 01/11/2023 | ABC | 1 | 40 |
2893584 | 01/11/2023 | ABC | 1 | 40 |
2893584 | 01/11/2023 | ABC | 1 | 43 |
2893584 | 01/11/2023 | ABC | 1 | 55 |
hi @Anonymous ,
what do you expect out of the sample data?
To display the weight of each container in the table view when the customer and date are the same in Power BI, you can create a calculated column using the DAX formula below:
Container Weight by Customer and Date =
VAR CurrentCustomer = 'Table'[Customer]
VAR CurrentDate = 'Table'[CompletedDate]
RETURN
CALCULATE(
SUM('Table'[Container Weight]),
FILTER(
'Table',
'Table'[Customer] = CurrentCustomer &&
'Table'[CompletedDate] = CurrentDate
)
)
This formula creates a new column called “Container Weight by Customer and Date” that sums the weight of all containers for the same customer and date. You can then add this column to your table view to display the individual weight of each container.
I hope this helps! Let me know if you have any other questions.
If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly.
In case there is still a problem, please feel free and explain your issue in detail, It will be my pleasure to assist you in any way I can.
You can check this solution in this link:
Thanks @123abc but it doesn't work. maybe i didn't explain myself clearly.
I figure another way by creating a column to give unique number for each container weight for same customer on same date.
i added the unique number to my table, then it work
User | Count |
---|---|
11 | |
8 | |
6 | |
6 | |
6 |
User | Count |
---|---|
24 | |
14 | |
13 | |
10 | |
7 |