Forum Discussion
Wrong Measure Result
Hello everybody,
I'm struggling with some measures.
My model is ambigous however i can get everything i need for now.
here is my model with black arrows to show were are the bidirectionnal links.
My measures are working very well, but i have sometimes a wrong calculation result on a measure.
The goal to achieve Is to transfer items from one warehouse to another where the items are authorized to Go (represented by The RANK of "TABLEAU DISPATCH" Table) Where a number says OK and priority goes from 1 (most important) to x (number of warehouses authorized)
Heres the result with one correct Item and one incorrect item (in the same table.
| CODE ARTICLE | LIBELLE ARTICLE | Rank for dispatch | Quantity by Size | (1) Final Split | Quantity movement | Warehouse code | Items in stock by size (not used) | (1)Residual quantities | (1) Attribution of residuals |
| From Base Article table | From Base article table | From Tableau dispatch table | From Stock dispo full table | Measure | measure | From dépots et établissements table | not used (Sum of Stock dispofull[Quantites physiques] | Measure (Take numbers after Decimals when division on Quantities / Total number of Warehouses) Take decimals multiplied by Number of warehouses | Measure : If (1) Residual quantities are greater or Equal to Rank Then 1 |
| AAAA | 2 | 1 | 2 | 1 | 010 | / | 0 | ||
| AAAA | 1 | 5 | 2 | -3 | 015 | / | 0 | ||
| AAAA | 3 | 2 | 2 | 040 | / | 0 | |||
| BBBB | 2 | 2 | 2 (error) => 3 (ok) | 0 | 010 | / | 2 | Should have 1 here | |
| BBBB | 1 | 6 | 3 | -3 | 015 | / | 2 | 1 | |
| BBBB | 3 | 2 | 2 | 040 | / | 2 |
For Item AAAA It works Great
However For Item BBBB
The Items in Quantity by size Show 8 in total (2+6) And column total is OK (8)
Then for (1) Répartition Finale It shows only 4 in Column Total and one quantity is not added from last column (1)Attribution des reliquats
Anybody can help me on this?
🙂
4 Replies
- Greg_Deckler
Community Champion
SebSchoon1 Sorry, having trouble following, can you post sample data as text and expected output?
Not really enough information to go on, please first check if your issue is a common issue listed here: https://community.powerbi.com/t5/Community-Blog/Before-You-Post-Read-This/ba-p/1116882
Also, please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490
The most important parts are:
1. Sample data as text, use the table tool in the editing bar
2. Expected output from sample data
3. Explanation in words of how to get from 1. to 2.- SebSchoon1
Post Patron
Hello,
Thank you for your answer!
I have created the exact table I'd like
Here the link for a Sample
The measure does not work for each items and i don't no why exactly.
It must simply distibute the items to different warehouses according to priority
I one warehouse Have 6 Items and the two other ones have 1 item ==> Total 7 Items For 3 warehouses
Rank 1 , 2 , 3
3 items in rank 1
2 items in rank 2
2 items in rank 2
and this for each Items ( even the one with different Sizes [TAILLE] in base article.
Kind regards,
- Greg_Deckler
Community Champion
SebSchoon1 Will have to take a closer look. FIFO/LIFO/where order matters can get tricky. In the mean time, this might help you. (3) Delivery Dates - Microsoft Power BI Community
- SebSchoon1
Post Patron